diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2005-09-16 13:28:01 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-20 13:44:31 -0400 |
commit | fe607aa94f5d25ee84f9a9a4fdf2cce3765e12e4 (patch) | |
tree | ca259d0afaa16ebc9ddc87e287e1358b069f3f60 /drivers | |
parent | beb8abd9a958999e238c31814230368045b942b3 (diff) |
[SCSI] dc395x: atomic_kmap for PIO
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/dc395x.c | 13 | ||||
-rw-r--r-- | drivers/scsi/tmscsim.c | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 600ba1202864..c44af5795b10 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -976,6 +976,16 @@ static void send_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) | |||
976 | } | 976 | } |
977 | } | 977 | } |
978 | 978 | ||
979 | static inline void pio_trigger(void) | ||
980 | { | ||
981 | static int feedback_requested; | ||
982 | |||
983 | if (!feedback_requested) { | ||
984 | feedback_requested = 1; | ||
985 | printk(KERN_WARNING "%s: Please, contact <linux-scsi@vger.kernel.org> " | ||
986 | "to help improve support for your system.\n", __FILE__); | ||
987 | } | ||
988 | } | ||
979 | 989 | ||
980 | /* Prepare SRB for being sent to Device DCB w/ command *cmd */ | 990 | /* Prepare SRB for being sent to Device DCB w/ command *cmd */ |
981 | static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, | 991 | static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, |
@@ -2320,6 +2330,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, | |||
2320 | CFG2_WIDEFIFO); | 2330 | CFG2_WIDEFIFO); |
2321 | while (DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) != 0x40) { | 2331 | while (DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) != 0x40) { |
2322 | u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); | 2332 | u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); |
2333 | pio_trigger(); | ||
2323 | *(srb->virt_addr)++ = byte; | 2334 | *(srb->virt_addr)++ = byte; |
2324 | if (debug_enabled(DBG_PIO)) | 2335 | if (debug_enabled(DBG_PIO)) |
2325 | printk(" %02x", byte); | 2336 | printk(" %02x", byte); |
@@ -2331,6 +2342,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, | |||
2331 | /* Read the last byte ... */ | 2342 | /* Read the last byte ... */ |
2332 | if (srb->total_xfer_length > 0) { | 2343 | if (srb->total_xfer_length > 0) { |
2333 | u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); | 2344 | u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); |
2345 | pio_trigger(); | ||
2334 | *(srb->virt_addr)++ = byte; | 2346 | *(srb->virt_addr)++ = byte; |
2335 | srb->total_xfer_length--; | 2347 | srb->total_xfer_length--; |
2336 | if (debug_enabled(DBG_PIO)) | 2348 | if (debug_enabled(DBG_PIO)) |
@@ -2507,6 +2519,7 @@ static void data_io_transfer(struct AdapterCtlBlk *acb, | |||
2507 | if (debug_enabled(DBG_PIO)) | 2519 | if (debug_enabled(DBG_PIO)) |
2508 | printk(" %02x", (unsigned char) *(srb->virt_addr)); | 2520 | printk(" %02x", (unsigned char) *(srb->virt_addr)); |
2509 | 2521 | ||
2522 | pio_trigger(); | ||
2510 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, | 2523 | DC395x_write8(acb, TRM_S1040_SCSI_FIFO, |
2511 | *(srb->virt_addr)++); | 2524 | *(srb->virt_addr)++); |
2512 | 2525 | ||
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 9589c67de535..386bd6c67e73 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -988,7 +988,15 @@ din_1: | |||
988 | 988 | ||
989 | if( residual ) | 989 | if( residual ) |
990 | { | 990 | { |
991 | static int feedback_requested; | ||
991 | bval = DC390_read8 (ScsiFifo); /* get one residual byte */ | 992 | bval = DC390_read8 (ScsiFifo); /* get one residual byte */ |
993 | |||
994 | if (!feedback_requested) { | ||
995 | feedback_requested = 1; | ||
996 | printk(KERN_WARNING "%s: Please, contact <linux-scsi@vger.kernel.org> " | ||
997 | "to help improve support for your system.\n", __FILE__); | ||
998 | } | ||
999 | |||
992 | ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr ); | 1000 | ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr ); |
993 | *ptr = bval; | 1001 | *ptr = bval; |
994 | pSRB->SGBusAddr++; xferCnt++; | 1002 | pSRB->SGBusAddr++; xferCnt++; |