From fe607aa94f5d25ee84f9a9a4fdf2cce3765e12e4 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 16 Sep 2005 19:28:01 +0200 Subject: [PATCH] [SCSI] dc395x: atomic_kmap for PIO Signed-off-by: Guennadi Liakhovetski Signed-off-by: James Bottomley --- drivers/scsi/dc395x.c | 13 +++++++++++++ drivers/scsi/tmscsim.c | 8 ++++++++ 2 files changed, 21 insertions(+) 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) } } +static inline void pio_trigger(void) +{ + static int feedback_requested; + + if (!feedback_requested) { + feedback_requested = 1; + printk(KERN_WARNING "%s: Please, contact " + "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)++); 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: 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 " + "to help improve support for your system.\n", __FILE__); + } + ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr ); *ptr = bval; pSRB->SGBusAddr++; xferCnt++; -- 2.39.5