patch-2.4.23 linux-2.4.23/drivers/scsi/pcmcia/nsp_message.c

Next file: linux-2.4.23/drivers/scsi/ql12160_fw.h
Previous file: linux-2.4.23/drivers/scsi/pcmcia/nsp_io.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/scsi/pcmcia/nsp_message.c linux-2.4.23/drivers/scsi/pcmcia/nsp_message.c
@@ -6,11 +6,12 @@
    the GNU General Public License.
  */
 
-/* $Id: nsp_message.c,v 1.7 2001/09/07 04:33:01 elca Exp $ */
+/* $Id: nsp_message.c,v 1.6 2003/07/26 14:21:09 elca Exp $ */
 
-static void nsp_message_in(Scsi_Cmnd *SCpnt, nsp_hw_data *data)
+static void nsp_message_in(Scsi_Cmnd *SCpnt)
 {
-	unsigned int  base = SCpnt->host->io_port;
+	unsigned int  base = SCpnt->device->host->io_port;
+	nsp_hw_data  *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
 	unsigned char data_reg, control_reg;
 	int           ret, len;
 
@@ -23,7 +24,7 @@
 	ret = 16;
 	len = 0;
 
-	DEBUG(0, " msgin loop\n");
+	nsp_dbg(NSP_DEBUG_MSGINOCCUR, "msgin loop");
 	do {
 		/* read data */
 		data_reg = nsp_index_read(base, SCSIDATAIN);
@@ -49,8 +50,9 @@
 
 }
 
-static void nsp_message_out(Scsi_Cmnd *SCpnt, nsp_hw_data *data)
+static void nsp_message_out(Scsi_Cmnd *SCpnt)
 {
+	nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
 	int ret = 1;
 	int len = data->MsgLen;
 
@@ -61,10 +63,10 @@
 	 * the next "msg out" if exists (no scsi phase changes).
 	 */
 
-	DEBUG(0, " msgout loop\n");
+	nsp_dbg(NSP_DEBUG_MSGOUTOCCUR, "msgout loop");
 	do {
-		if (nsp_xfer(SCpnt, data, BUSPHASE_MESSAGE_OUT)) {
-			printk(KERN_DEBUG " " __FUNCTION__ " msgout: xfer short\n");
+		if (nsp_xfer(SCpnt, BUSPHASE_MESSAGE_OUT)) {
+			nsp_msg(KERN_DEBUG, "msgout: xfer short");
 		}
 
 		/* catch a next signal */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)