lkml.org 
[lkml]   [1996]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectMisc changes in the 8xx driver

Hello,

I have added a select_queue_depths function to the driver. The code is
trivial and there is no risk to break anything. But I think it can
have some advantages (see the ChangeLog file patch below). The version
become 1.12b to identify this change.

The problem of "CCB address mismatch" that may happen with the 3
versions of the driver (freeBSD, NetBSD and Linux) is a known problem.
I have included a change suggested by Stephan Esser.
(a "return" has been removed).
If you got this problem, could you try again with this patch, please, and
let me known whether it made any difference.

Here the patch against 2.0.8:

----------------------------- Cut here -----------------------------------
--- /tmp/linux/drivers/scsi/ChangeLog.ncr53c8xx Tue Jul 16 23:09:45 1996
+++ linux/drivers/scsi/ChangeLog.ncr53c8xx Sun Jul 21 11:56:59 1996
@@ -1,3 +1,27 @@
+Sun Jul 21 00:00 1996 Gerard Roudier (groudier@club-internet.fr)
+ * ncr53c8xx.c, README.ncr53c8xx
+ Add the ncr53c8xx_select_queue_depths() function.
+ Set queue_depth to SCSI_NCR_MAX_TAGS (4 by default) for devices that
+ support tagged command queueing.
+ For other devices, set queue_depth to 1. No need to queue a command
+ to the driver if this command cannot be sent to the device.
+ Each time the driver hide io requests from the kernel and/or from the
+ driver, it may break a little (or a lot) optimization algorithms that
+ try to increase throughput by reordering io requests.
+ It is better to enable the disk write caching to reduce latencies for
+ write operations, and to trust asynchronous read ahead from the device
+ and from the kernel that can reduce latencies for read operations,
+ even when tagged command queuing is not supported or enabled.
+
+Sat Jul 20 20:00 1996 Gerard Roudier (groudier@club-internet.fr)
+ * ncr53c8xx.c
+ Minor changes:
+ - Problem of "CCB address mismatch" that happens with the 3 versions
+ of the driver. The CCB is correct and Stefan Esser suggests a little
+ patch that seems to be a bypass.
+ Stefan says he will change that in a future version of the BSD driver.
+ - Set burst transfers to 8 for 815 chips.
+
Sun Jul 14 15:00 1996 Gerard Roudier (groudier@club-internet.fr)
* ncr53c8xx.c, Configure.help
Memory mapped io donnot work under linux/Alpha for the driver.
--- /tmp/linux/drivers/scsi/ncr53c8xx.c Tue Jul 16 23:09:45 1996
+++ linux/drivers/scsi/ncr53c8xx.c Sun Jul 21 00:54:22 1996
@@ -40,7 +40,7 @@
*/

/*
-** 23 June 1996, version 1.12
+** 21 July 1996, version 1.12b
**
** Supported SCSI-II features:
** Synchronous negotiation
@@ -424,6 +424,10 @@

#define ScsiResult(host_code, scsi_code) (((host_code) << 16) + ((scsi_code) & 0x7f))

+#if LINUX_VERSION_CODE >= LinuxVersionCode(2,0,0)
+static void ncr53c8xx_select_queue_depths(struct Scsi_Host *host, struct scsi_device *devlist);
+#endif
+
#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,70)
static void ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);
#else
@@ -3494,6 +3498,9 @@
instance->io_port = io_port;
instance->n_io_port = 128;
instance->dma_channel = 0;
+#if LINUX_VERSION_CODE >= LinuxVersionCode(2,0,0)
+ instance->select_queue_depths = ncr53c8xx_select_queue_depths;
+#endif

/*
** Patch script to physical addresses
@@ -4786,7 +4793,7 @@
else
/** NCR53C815 **/
if (ChipDevice == PCI_DEVICE_ID_NCR_53C815) {
- OUTB(nc_dmode, 0x00); /* Set 2-transfer burst */
+ OUTB(nc_dmode, 0x80); /* Set 8-transfer burst */
}
else
/** NCR53C825 **/
@@ -5874,7 +5881,7 @@
if (cp != np->header.cp) {
printf ("%s: SCSI phase error fixup: CCB address mismatch (0x%08lx != 0x%08lx)\n",
ncr_name (np), (u_long) cp, (u_long) np->header.cp);
- return;
+/* return;*/
}

/*
@@ -7521,6 +7528,30 @@
(int) irq, bus, (uchar) device_fn);
}

+#if LINUX_VERSION_CODE >= LinuxVersionCode(2,0,0)
+/*
+** Linux select queue depths function
+*/
+static void ncr53c8xx_select_queue_depths(struct Scsi_Host *host, struct scsi_device *devlist)
+{
+ struct scsi_device *device;
+
+ for (device = devlist; device; device = device->next) {
+ if (device->host == host) {
+ if (device->tagged_supported) {
+ device->queue_depth = SCSI_NCR_MAX_TAGS;
+ }
+ else {
+ device->queue_depth = 1;
+ }
+#ifdef DEBUG
+printk("ncr53c8xx_select_queue_depth: id=%d, lun=%d, queue_depth=%d\n",
+ device->id, device->lun, device->queue_depth);
+#endif
+ }
+ }
+}
+#endif

/*
** Linux entry point of queuecommand() function
--- /tmp/linux/drivers/scsi/ncr53c8xx.h Sat Jul 6 16:09:02 1996
+++ linux/drivers/scsi/ncr53c8xx.h Sun Jul 21 00:43:41 1996
@@ -196,7 +196,7 @@

#if LINUX_VERSION_CODE >= LinuxVersionCode(1,3,0)

-#define NCR53C8XX {NULL,NULL,NULL,NULL,"ncr53c8xx (rel 1.12a)", ncr53c8xx_detect,\
+#define NCR53C8XX {NULL,NULL,NULL,NULL,"ncr53c8xx (rel 1.12b)", ncr53c8xx_detect,\
ncr53c8xx_release, /* info */ NULL, /* command, deprecated */ NULL, \
ncr53c8xx_queue_command, ncr53c8xx_abort, ncr53c8xx_reset, \
NULL /* slave attach */, scsicam_bios_param, /* can queue */ SCSI_NCR_CAN_QUEUE,\
@@ -207,7 +207,7 @@
#else


-#define NCR53C8XX {NULL, NULL, "ncr53c8xx (rel 1.12a)", ncr53c8xx_detect,\
+#define NCR53C8XX {NULL, NULL, "ncr53c8xx (rel 1.12b)", ncr53c8xx_detect,\
ncr53c8xx_release, /* info */ NULL, /* command, deprecated */ NULL, \
ncr53c8xx_queue_command, ncr53c8xx_abort, ncr53c8xx_reset, \
NULL /* slave attach */, scsicam_bios_param, /* can queue */ SCSI_NCR_CAN_QUEUE,\
---------------------------------- Cut here --------------------------------


Regards, Gerard.



\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.028 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site