fix compile breakage on drivers/scsi/ibmmca.c

fix compile breakage on drivers/scsi/ibmmca.c

Post by John Ki » Sat, 15 Feb 2003 23:40:12



This fixes compile breakage due to recent changes to scsi.h

John Kim

--- linux-2.5.60-bk4/drivers/scsi/ibmmca.c      2003-02-10 13:37:58.000000000 -0500
+++ linux-2.5.60-bk4-new/drivers/scsi/ibmmca.c  2003-02-14 16:10:27.000000000 -0500
@@ -1824,7 +1824,7 @@
        int i;
        struct scatterlist *sl;

-       shpnt = cmd->host;
+       shpnt = cmd->device->host;
        /* search for the right hostadapter */
        for (host_index = 0; hosts[host_index] && hosts[host_index]->host_no != shpnt->host_no; host_index++);

@@ -1836,16 +1836,16 @@
        }
        max_pun = subsystem_maxid(host_index);
        if (ibm_ansi_order) {
-               target = max_pun - 1 - cmd->target;
-               if ((target <= subsystem_pun(host_index)) && (cmd->target <= subsystem_pun(host_index)))
+               target = max_pun - 1 - cmd->device->id;
+               if ((target <= subsystem_pun(host_index)) && (cmd->device->id <= subsystem_pun(host_index)))
                        target--;
-               else if ((target >= subsystem_pun(host_index)) && (cmd->target >= subsystem_pun(host_index)))
+               else if ((target >= subsystem_pun(host_index)) && (cmd->device->id >= subsystem_pun(host_index)))
                        target++;
        } else
-               target = cmd->target;
+               target = cmd->device->id;

        /* if (target,lun) is NO LUN or not existing at all, return error */
-       if ((get_scsi(host_index)[target][cmd->lun] == TYPE_NO_LUN) || (get_scsi(host_index)[target][cmd->lun] == TYPE_NO_DEVICE)) {
+       if ((get_scsi(host_index)[target][cmd->device->lun] == TYPE_NO_LUN) || (get_scsi(host_index)[target][cmd->device->lun] == TYPE_NO_DEVICE)) {
                cmd->result = DID_NO_CONNECT << 16;
                if (done)
                        done(cmd);
@@ -1853,7 +1853,7 @@
        }

        /*if (target,lun) unassigned, do further checks... */
-       ldn = get_ldn(host_index)[target][cmd->lun];
+       ldn = get_ldn(host_index)[target][cmd->device->lun];
        if (ldn >= MAX_LOG_DEV) {    /* on invalid ldn do special stuff */
                if (ldn > MAX_LOG_DEV) {     /* dynamical remapping if ldn unassigned */
                        current_ldn = next_ldn(host_index);     /* stop-value for one circle */
@@ -1864,7 +1864,7 @@
                                        next_ldn(host_index) = 7;
                                if (current_ldn == next_ldn(host_index)) {      /* One circle done ? */
                                        /* no non-processing ldn found */
-                                       printk("IBM MCA SCSI: Cannot assign SCSI-device dynamically!\n" "              On ldn 7-14 SCSI-commands everywhere in progress.\n" "              Reporting DID_NO_CONNECT for device (%d,%d).\n", target, cmd->lun);
+                                       printk("IBM MCA SCSI: Cannot assign SCSI-device dynamically!\n" "              On ldn 7-14 SCSI-commands everywhere in progress.\n" "              Reporting DID_NO_CONNECT for device (%d,%d).\n", target, cmd->device->lun);
                                        cmd->result = DID_NO_CONNECT << 16;    /* return no connect */
                                        if (done)
                                                done(cmd);
@@ -1884,26 +1884,26 @@
                        /* set reduced interrupt_handler-mode for checking */
                        local_checking_phase_flag(host_index) = 1;
                        /* map found ldn to pun,lun */
-                       get_ldn(host_index)[target][cmd->lun] = next_ldn(host_index);
+                       get_ldn(host_index)[target][cmd->device->lun] = next_ldn(host_index);
                        /* change ldn to the right value, that is now next_ldn */
                        ldn = next_ldn(host_index);
                        /* unassign all ldns (pun,lun,ldn does not matter for remove) */
                        immediate_assign(host_index, 0, 0, 0, REMOVE_LDN);
                        /* set only LDN for remapped device */
-                       immediate_assign(host_index, target, cmd->lun, ldn, SET_LDN);
+                       immediate_assign(host_index, target, cmd->device->lun, ldn, SET_LDN);
                        /* get device information for ld[ldn] */
                        if (device_exists(host_index, ldn, &ld(host_index)[ldn].block_length, &ld(host_index)[ldn].device_type)) {
                                ld(host_index)[ldn].cmd = NULL; /* To prevent panic set 0, because
                                                                   devices that were not assigned,
                                                                   should have nothing in progress. */
-                               get_scsi(host_index)[target][cmd->lun] = ld(host_index)[ldn].device_type;
+                               get_scsi(host_index)[target][cmd->device->lun] = ld(host_index)[ldn].device_type;
                                /* increase assignment counters for statistics in /proc */
                                IBM_DS(host_index).dynamical_assignments++;
                                IBM_DS(host_index).ldn_assignments[ldn]++;
                        } else
                                /* panic here, because a device, found at boottime has
                                   vanished */
-                               panic("IBM MCA SCSI: ldn=0x%x, SCSI-device on (%d,%d) vanished!\n", ldn, target, cmd->lun);
+                               panic("IBM MCA SCSI: ldn=0x%x, SCSI-device on (%d,%d) vanished!\n", ldn, target, cmd->device->lun);
                        /* unassign again all ldns (pun,lun,ldn does not matter for remove) */
                        immediate_assign(host_index, 0, 0, 0, REMOVE_LDN);
                        /* remap all ldns, as written in the pun/lun table */
@@ -2141,7 +2141,7 @@
        printk("IBM MCA SCSI: Abort subroutine called...\n");
 #endif

-       shpnt = cmd->host;
+       shpnt = cmd->device->host;
        /* search for the right hostadapter */
        for (host_index = 0; hosts[host_index] && hosts[host_index]->host_no != shpnt->host_no; host_index++);

@@ -2149,7 +2149,7 @@
                cmd->result = DID_NO_CONNECT << 16;
                if (cmd->scsi_done)
                        (cmd->scsi_done) (cmd);
-               shpnt = cmd->host;
+               shpnt = cmd->device->host;
 #ifdef IM_DEBUG_PROBE
                printk(KERN_DEBUG "IBM MCA SCSI: Abort adapter selection failed!\n");
 #endif
@@ -2157,17 +2157,17 @@
        }
        max_pun = subsystem_maxid(host_index);
        if (ibm_ansi_order) {
-               target = max_pun - 1 - cmd->target;
-               if ((target <= subsystem_pun(host_index)) && (cmd->target <= subsystem_pun(host_index)))
+               target = max_pun - 1 - cmd->device->id;
+               if ((target <= subsystem_pun(host_index)) && (cmd->device->id <= subsystem_pun(host_index)))
                        target--;
-               else if ((target >= subsystem_pun(host_index)) && (cmd->target >= subsystem_pun(host_index)))
+               else if ((target >= subsystem_pun(host_index)) && (cmd->device->id >= subsystem_pun(host_index)))
                        target++;
        } else
-               target = cmd->target;
+               target = cmd->device->id;

        /* get logical device number, and disable system interrupts */
-       printk(KERN_WARNING "IBM MCA SCSI: Sending abort to device pun=%d, lun=%d.\n", target, cmd->lun);
-       ldn = get_ldn(host_index)[target][cmd->lun];
+       printk(KERN_WARNING "IBM MCA SCSI: Sending abort to device pun=%d, lun=%d.\n", target, cmd->device->lun);
+       ldn = get_ldn(host_index)[target][cmd->device->lun];

        /*if cmd for this ldn has already finished, no need to abort */
        if (!ld(host_index)[ldn].cmd) {
@@ -2242,7 +2242,7 @@
                BUG();

        ticks = IM_RESET_DELAY * HZ;
-       shpnt = cmd->host;
+       shpnt = cmd->device->host;
        /* search for the right hostadapter */
        for (host_index = 0; hosts[host_index] && hosts[host_index]->host_no != shpnt->host_no; host_index++);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. fix compile breakage on drivers/scsi/fd_mcs.c

This fixes compile breakage due to recent changes to scsi.h

John Kim

--- linux-2.5.60-bk4/drivers/scsi/fd_mcs.c      2003-02-10 13:38:20.000000000 -0500

                outb(0x40 | FIFO_COUNT, Interrupt_Cntl_port);

                outb(0x82, SCSI_Cntl_port);     /* Bus Enable + Select */
-               outb(adapter_mask | (1 << current_SC->target), SCSI_Data_NoACK_port);
+               outb(adapter_mask | (1 << current_SC->device->id), SCSI_Data_NoACK_port);

                /* Stop arbitration and enable parity */

                status = inb(SCSI_Status_port);
                if (!(status & 0x01)) {
                        /* Try again, for slow devices */
-                       if (fd_mcs_select(shpnt, current_SC->target)) {
+                       if (fd_mcs_select(shpnt, current_SC->device->id)) {
 #if EVERY_ACCESS
                                printk(" SFAIL ");

 static int fd_mcs_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
 {
-       struct Scsi_Host *shpnt = SCpnt->host;
+       struct Scsi_Host *shpnt = SCpnt->device->host;

        if (in_command) {

 static int fd_mcs_abort(Scsi_Cmnd * SCpnt)
 {
-       struct Scsi_Host *shpnt = SCpnt->host;
+       struct Scsi_Host *shpnt = SCpnt->device->host;

        unsigned long flags;

 }

 static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) {
-       struct Scsi_Host *shpnt = SCpnt->host;
+       struct Scsi_Host *shpnt = SCpnt->device->host;

 #if DEBUG_RESET
        static int called_once = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. openssh3.3p1 + solaris 8

3. fix compile breakage on drivers/scsi/NCR53c406a.c

4. Basics in ANSI-C

5. fix compile breakage on drivers/scsi/seagate.c

6. keyboard problem (Sparc, Solaris 2.6)

7. fix compile breakage on drivers/scsi/wd7000.c

8. Question re: internal network and VPN

9. fix compile breakage on drivers/scsi/NCR53C9x.c

10. fix compile breakage in drivers/input/gameport

11. fix compile breakage in drivers/net/irda/vlsi_ir.c

12. fix compile breakage in drivers/net/arcnet/com20020-pci.c

13. fix compile breakage in fs/ after nanosecond stat timefields patch