@@ -798,11 +798,18 @@ struct scsi_host_template aic7xxx_driver_template = {
798
798
799
799
/**************************** Tasklet Handler *********************************/
800
800
801
- /******************************** Macros **************************************/
802
- #define BUILD_SCSIID (ahc , cmd ) \
803
- ((((cmd)->device->id << TID_SHIFT) & TID) \
804
- | (((cmd)->device->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
805
- | (((cmd)->device->channel == 0) ? 0 : TWIN_CHNLB))
801
+
802
+ static inline unsigned int ahc_build_scsiid (struct ahc_softc * ahc ,
803
+ struct scsi_device * sdev )
804
+ {
805
+ unsigned int scsiid = (sdev -> id << TID_SHIFT ) & TID ;
806
+
807
+ if (sdev -> channel == 0 )
808
+ scsiid |= ahc -> our_id ;
809
+ else
810
+ scsiid |= ahc -> our_id_b | TWIN_CHNLB ;
811
+ return scsiid ;
812
+ }
806
813
807
814
/******************************** Bus DMA *************************************/
808
815
int
@@ -1457,7 +1464,7 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
1457
1464
* Fill out basics of the HSCB.
1458
1465
*/
1459
1466
hscb -> control = 0 ;
1460
- hscb -> scsiid = BUILD_SCSIID (ahc , cmd );
1467
+ hscb -> scsiid = ahc_build_scsiid (ahc , cmd -> device );
1461
1468
hscb -> lun = cmd -> device -> lun ;
1462
1469
mask = SCB_GET_TARGET_MASK (ahc , scb );
1463
1470
tinfo = ahc_fetch_transinfo (ahc , SCB_GET_CHANNEL (ahc , scb ),
0 commit comments