]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] dc395x: atomic_kmap for PIO
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 16 Sep 2005 17:28:01 +0000 (19:28 +0200)
committerJames Bottomley <jejb@mulgrave.(none)>
Tue, 20 Sep 2005 17:44:31 +0000 (12:44 -0500)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/dc395x.c
drivers/scsi/tmscsim.c

index 600ba120286468e63f0df8240e08613dee24fdf5..c44af5795b10a547f0c7e915a7aed4de90e7cc0b 100644 (file)
@@ -976,6 +976,16 @@ static void send_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb)
        }
 }
 
+static inline void pio_trigger(void)
+{
+       static int feedback_requested;
+
+       if (!feedback_requested) {
+               feedback_requested = 1;
+               printk(KERN_WARNING "%s: Please, contact <linux-scsi@vger.kernel.org> "
+                      "to help improve support for your system.\n", __FILE__);
+       }
+}
 
 /* Prepare SRB for being sent to Device DCB w/ command *cmd */
 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,
                                              CFG2_WIDEFIFO);
                        while (DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) != 0x40) {
                                u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+                               pio_trigger();
                                *(srb->virt_addr)++ = byte;
                                if (debug_enabled(DBG_PIO))
                                        printk(" %02x", byte);
@@ -2331,6 +2342,7 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
                 /* Read the last byte ... */
                                if (srb->total_xfer_length > 0) {
                                        u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+                                       pio_trigger();
                                        *(srb->virt_addr)++ = byte;
                                        srb->total_xfer_length--;
                                        if (debug_enabled(DBG_PIO))
@@ -2507,6 +2519,7 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
                                if (debug_enabled(DBG_PIO))
                                        printk(" %02x", (unsigned char) *(srb->virt_addr));
 
+                               pio_trigger();
                                DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 
                                     *(srb->virt_addr)++);
 
index 9589c67de5350100afc42f5220fb5799939237c7..386bd6c67e730aaedbb4367e4849cba93e1ba4cc 100644 (file)
@@ -988,7 +988,15 @@ din_1:
 
            if( residual )
            {
+               static int feedback_requested;
                bval = DC390_read8 (ScsiFifo);      /* get one residual byte */
+
+               if (!feedback_requested) {
+                       feedback_requested = 1;
+                       printk(KERN_WARNING "%s: Please, contact <linux-scsi@vger.kernel.org> "
+                              "to help improve support for your system.\n", __FILE__);
+               }
+
                ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr );
                *ptr = bval;
                pSRB->SGBusAddr++; xferCnt++;