diff options
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 18 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 20 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/cam.h | 6 |
3 files changed, 22 insertions, 22 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index fb2877c303f0..550c9921691a 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -687,7 +687,7 @@ ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb) | |||
687 | int direction; | 687 | int direction; |
688 | 688 | ||
689 | cmd = scb->io_ctx; | 689 | cmd = scb->io_ctx; |
690 | direction = scsi_to_pci_dma_dir(cmd->sc_data_direction); | 690 | direction = cmd->sc_data_direction; |
691 | ahd_sync_sglist(ahd, scb, BUS_DMASYNC_POSTWRITE); | 691 | ahd_sync_sglist(ahd, scb, BUS_DMASYNC_POSTWRITE); |
692 | if (cmd->use_sg != 0) { | 692 | if (cmd->use_sg != 0) { |
693 | struct scatterlist *sg; | 693 | struct scatterlist *sg; |
@@ -3338,7 +3338,7 @@ ahd_linux_dv_inq(struct ahd_softc *ahd, struct scsi_cmnd *cmd, | |||
3338 | } | 3338 | } |
3339 | 3339 | ||
3340 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); | 3340 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); |
3341 | cmd->sc_data_direction = SCSI_DATA_READ; | 3341 | cmd->sc_data_direction = DMA_FROM_DEVICE; |
3342 | cmd->cmd_len = 6; | 3342 | cmd->cmd_len = 6; |
3343 | cmd->cmnd[0] = INQUIRY; | 3343 | cmd->cmnd[0] = INQUIRY; |
3344 | cmd->cmnd[4] = request_length; | 3344 | cmd->cmnd[4] = request_length; |
@@ -3363,7 +3363,7 @@ ahd_linux_dv_tur(struct ahd_softc *ahd, struct scsi_cmnd *cmd, | |||
3363 | #endif | 3363 | #endif |
3364 | /* Do a TUR to clear out any non-fatal transitional state */ | 3364 | /* Do a TUR to clear out any non-fatal transitional state */ |
3365 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); | 3365 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); |
3366 | cmd->sc_data_direction = SCSI_DATA_NONE; | 3366 | cmd->sc_data_direction = DMA_NONE; |
3367 | cmd->cmd_len = 6; | 3367 | cmd->cmd_len = 6; |
3368 | cmd->cmnd[0] = TEST_UNIT_READY; | 3368 | cmd->cmnd[0] = TEST_UNIT_READY; |
3369 | } | 3369 | } |
@@ -3385,7 +3385,7 @@ ahd_linux_dv_rebd(struct ahd_softc *ahd, struct scsi_cmnd *cmd, | |||
3385 | free(targ->dv_buffer, M_DEVBUF); | 3385 | free(targ->dv_buffer, M_DEVBUF); |
3386 | targ->dv_buffer = malloc(AHD_REBD_LEN, M_DEVBUF, M_WAITOK); | 3386 | targ->dv_buffer = malloc(AHD_REBD_LEN, M_DEVBUF, M_WAITOK); |
3387 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); | 3387 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); |
3388 | cmd->sc_data_direction = SCSI_DATA_READ; | 3388 | cmd->sc_data_direction = DMA_FROM_DEVICE; |
3389 | cmd->cmd_len = 10; | 3389 | cmd->cmd_len = 10; |
3390 | cmd->cmnd[0] = READ_BUFFER; | 3390 | cmd->cmnd[0] = READ_BUFFER; |
3391 | cmd->cmnd[1] = 0x0b; | 3391 | cmd->cmnd[1] = 0x0b; |
@@ -3407,7 +3407,7 @@ ahd_linux_dv_web(struct ahd_softc *ahd, struct scsi_cmnd *cmd, | |||
3407 | } | 3407 | } |
3408 | #endif | 3408 | #endif |
3409 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); | 3409 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); |
3410 | cmd->sc_data_direction = SCSI_DATA_WRITE; | 3410 | cmd->sc_data_direction = DMA_TO_DEVICE; |
3411 | cmd->cmd_len = 10; | 3411 | cmd->cmd_len = 10; |
3412 | cmd->cmnd[0] = WRITE_BUFFER; | 3412 | cmd->cmnd[0] = WRITE_BUFFER; |
3413 | cmd->cmnd[1] = 0x0a; | 3413 | cmd->cmnd[1] = 0x0a; |
@@ -3429,7 +3429,7 @@ ahd_linux_dv_reb(struct ahd_softc *ahd, struct scsi_cmnd *cmd, | |||
3429 | } | 3429 | } |
3430 | #endif | 3430 | #endif |
3431 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); | 3431 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); |
3432 | cmd->sc_data_direction = SCSI_DATA_READ; | 3432 | cmd->sc_data_direction = DMA_FROM_DEVICE; |
3433 | cmd->cmd_len = 10; | 3433 | cmd->cmd_len = 10; |
3434 | cmd->cmnd[0] = READ_BUFFER; | 3434 | cmd->cmnd[0] = READ_BUFFER; |
3435 | cmd->cmnd[1] = 0x0a; | 3435 | cmd->cmnd[1] = 0x0a; |
@@ -3455,7 +3455,7 @@ ahd_linux_dv_su(struct ahd_softc *ahd, struct scsi_cmnd *cmd, | |||
3455 | } | 3455 | } |
3456 | #endif | 3456 | #endif |
3457 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); | 3457 | ahd_linux_dv_fill_cmd(ahd, cmd, devinfo); |
3458 | cmd->sc_data_direction = SCSI_DATA_NONE; | 3458 | cmd->sc_data_direction = DMA_NONE; |
3459 | cmd->cmd_len = 6; | 3459 | cmd->cmd_len = 6; |
3460 | cmd->cmnd[0] = START_STOP_UNIT; | 3460 | cmd->cmnd[0] = START_STOP_UNIT; |
3461 | cmd->cmnd[4] = le | SSS_START; | 3461 | cmd->cmnd[4] = le | SSS_START; |
@@ -4018,7 +4018,7 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev) | |||
4018 | int dir; | 4018 | int dir; |
4019 | 4019 | ||
4020 | cur_seg = (struct scatterlist *)cmd->request_buffer; | 4020 | cur_seg = (struct scatterlist *)cmd->request_buffer; |
4021 | dir = scsi_to_pci_dma_dir(cmd->sc_data_direction); | 4021 | dir = cmd->sc_data_direction; |
4022 | nseg = pci_map_sg(ahd->dev_softc, cur_seg, | 4022 | nseg = pci_map_sg(ahd->dev_softc, cur_seg, |
4023 | cmd->use_sg, dir); | 4023 | cmd->use_sg, dir); |
4024 | scb->platform_data->xfer_len = 0; | 4024 | scb->platform_data->xfer_len = 0; |
@@ -4038,7 +4038,7 @@ ahd_linux_run_device_queue(struct ahd_softc *ahd, struct ahd_linux_device *dev) | |||
4038 | int dir; | 4038 | int dir; |
4039 | 4039 | ||
4040 | sg = scb->sg_list; | 4040 | sg = scb->sg_list; |
4041 | dir = scsi_to_pci_dma_dir(cmd->sc_data_direction); | 4041 | dir = cmd->sc_data_direction; |
4042 | addr = pci_map_single(ahd->dev_softc, | 4042 | addr = pci_map_single(ahd->dev_softc, |
4043 | cmd->request_buffer, | 4043 | cmd->request_buffer, |
4044 | cmd->request_bufflen, dir); | 4044 | cmd->request_bufflen, dir); |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 031c6aaa5ca5..35d6de5a4c9d 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -693,12 +693,12 @@ ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb) | |||
693 | 693 | ||
694 | sg = (struct scatterlist *)cmd->request_buffer; | 694 | sg = (struct scatterlist *)cmd->request_buffer; |
695 | pci_unmap_sg(ahc->dev_softc, sg, cmd->use_sg, | 695 | pci_unmap_sg(ahc->dev_softc, sg, cmd->use_sg, |
696 | scsi_to_pci_dma_dir(cmd->sc_data_direction)); | 696 | cmd->sc_data_direction); |
697 | } else if (cmd->request_bufflen != 0) { | 697 | } else if (cmd->request_bufflen != 0) { |
698 | pci_unmap_single(ahc->dev_softc, | 698 | pci_unmap_single(ahc->dev_softc, |
699 | scb->platform_data->buf_busaddr, | 699 | scb->platform_data->buf_busaddr, |
700 | cmd->request_bufflen, | 700 | cmd->request_bufflen, |
701 | scsi_to_pci_dma_dir(cmd->sc_data_direction)); | 701 | cmd->sc_data_direction); |
702 | } | 702 | } |
703 | } | 703 | } |
704 | 704 | ||
@@ -3007,7 +3007,7 @@ ahc_linux_dv_inq(struct ahc_softc *ahc, struct scsi_cmnd *cmd, | |||
3007 | } | 3007 | } |
3008 | 3008 | ||
3009 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); | 3009 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); |
3010 | cmd->sc_data_direction = SCSI_DATA_READ; | 3010 | cmd->sc_data_direction = DMA_FROM_DEVICE; |
3011 | cmd->cmd_len = 6; | 3011 | cmd->cmd_len = 6; |
3012 | cmd->cmnd[0] = INQUIRY; | 3012 | cmd->cmnd[0] = INQUIRY; |
3013 | cmd->cmnd[4] = request_length; | 3013 | cmd->cmnd[4] = request_length; |
@@ -3032,7 +3032,7 @@ ahc_linux_dv_tur(struct ahc_softc *ahc, struct scsi_cmnd *cmd, | |||
3032 | #endif | 3032 | #endif |
3033 | /* Do a TUR to clear out any non-fatal transitional state */ | 3033 | /* Do a TUR to clear out any non-fatal transitional state */ |
3034 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); | 3034 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); |
3035 | cmd->sc_data_direction = SCSI_DATA_NONE; | 3035 | cmd->sc_data_direction = DMA_NONE; |
3036 | cmd->cmd_len = 6; | 3036 | cmd->cmd_len = 6; |
3037 | cmd->cmnd[0] = TEST_UNIT_READY; | 3037 | cmd->cmnd[0] = TEST_UNIT_READY; |
3038 | } | 3038 | } |
@@ -3054,7 +3054,7 @@ ahc_linux_dv_rebd(struct ahc_softc *ahc, struct scsi_cmnd *cmd, | |||
3054 | free(targ->dv_buffer, M_DEVBUF); | 3054 | free(targ->dv_buffer, M_DEVBUF); |
3055 | targ->dv_buffer = malloc(AHC_REBD_LEN, M_DEVBUF, M_WAITOK); | 3055 | targ->dv_buffer = malloc(AHC_REBD_LEN, M_DEVBUF, M_WAITOK); |
3056 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); | 3056 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); |
3057 | cmd->sc_data_direction = SCSI_DATA_READ; | 3057 | cmd->sc_data_direction = DMA_FROM_DEVICE; |
3058 | cmd->cmd_len = 10; | 3058 | cmd->cmd_len = 10; |
3059 | cmd->cmnd[0] = READ_BUFFER; | 3059 | cmd->cmnd[0] = READ_BUFFER; |
3060 | cmd->cmnd[1] = 0x0b; | 3060 | cmd->cmnd[1] = 0x0b; |
@@ -3076,7 +3076,7 @@ ahc_linux_dv_web(struct ahc_softc *ahc, struct scsi_cmnd *cmd, | |||
3076 | } | 3076 | } |
3077 | #endif | 3077 | #endif |
3078 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); | 3078 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); |
3079 | cmd->sc_data_direction = SCSI_DATA_WRITE; | 3079 | cmd->sc_data_direction = DMA_TO_DEVICE; |
3080 | cmd->cmd_len = 10; | 3080 | cmd->cmd_len = 10; |
3081 | cmd->cmnd[0] = WRITE_BUFFER; | 3081 | cmd->cmnd[0] = WRITE_BUFFER; |
3082 | cmd->cmnd[1] = 0x0a; | 3082 | cmd->cmnd[1] = 0x0a; |
@@ -3098,7 +3098,7 @@ ahc_linux_dv_reb(struct ahc_softc *ahc, struct scsi_cmnd *cmd, | |||
3098 | } | 3098 | } |
3099 | #endif | 3099 | #endif |
3100 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); | 3100 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); |
3101 | cmd->sc_data_direction = SCSI_DATA_READ; | 3101 | cmd->sc_data_direction = DMA_FROM_DEVICE; |
3102 | cmd->cmd_len = 10; | 3102 | cmd->cmd_len = 10; |
3103 | cmd->cmnd[0] = READ_BUFFER; | 3103 | cmd->cmnd[0] = READ_BUFFER; |
3104 | cmd->cmnd[1] = 0x0a; | 3104 | cmd->cmnd[1] = 0x0a; |
@@ -3124,7 +3124,7 @@ ahc_linux_dv_su(struct ahc_softc *ahc, struct scsi_cmnd *cmd, | |||
3124 | } | 3124 | } |
3125 | #endif | 3125 | #endif |
3126 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); | 3126 | ahc_linux_dv_fill_cmd(ahc, cmd, devinfo); |
3127 | cmd->sc_data_direction = SCSI_DATA_NONE; | 3127 | cmd->sc_data_direction = DMA_NONE; |
3128 | cmd->cmd_len = 6; | 3128 | cmd->cmd_len = 6; |
3129 | cmd->cmnd[0] = START_STOP_UNIT; | 3129 | cmd->cmnd[0] = START_STOP_UNIT; |
3130 | cmd->cmnd[4] = le | SSS_START; | 3130 | cmd->cmnd[4] = le | SSS_START; |
@@ -3659,7 +3659,7 @@ ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev) | |||
3659 | 3659 | ||
3660 | cur_seg = (struct scatterlist *)cmd->request_buffer; | 3660 | cur_seg = (struct scatterlist *)cmd->request_buffer; |
3661 | nseg = pci_map_sg(ahc->dev_softc, cur_seg, cmd->use_sg, | 3661 | nseg = pci_map_sg(ahc->dev_softc, cur_seg, cmd->use_sg, |
3662 | scsi_to_pci_dma_dir(cmd->sc_data_direction)); | 3662 | cmd->sc_data_direction); |
3663 | end_seg = cur_seg + nseg; | 3663 | end_seg = cur_seg + nseg; |
3664 | /* Copy the segments into the SG list. */ | 3664 | /* Copy the segments into the SG list. */ |
3665 | sg = scb->sg_list; | 3665 | sg = scb->sg_list; |
@@ -3703,7 +3703,7 @@ ahc_linux_run_device_queue(struct ahc_softc *ahc, struct ahc_linux_device *dev) | |||
3703 | addr = pci_map_single(ahc->dev_softc, | 3703 | addr = pci_map_single(ahc->dev_softc, |
3704 | cmd->request_buffer, | 3704 | cmd->request_buffer, |
3705 | cmd->request_bufflen, | 3705 | cmd->request_bufflen, |
3706 | scsi_to_pci_dma_dir(cmd->sc_data_direction)); | 3706 | cmd->sc_data_direction); |
3707 | scb->platform_data->buf_busaddr = addr; | 3707 | scb->platform_data->buf_busaddr = addr; |
3708 | scb->sg_count = ahc_linux_map_seg(ahc, scb, | 3708 | scb->sg_count = ahc_linux_map_seg(ahc, scb, |
3709 | sg, addr, | 3709 | sg, addr, |
diff --git a/drivers/scsi/aic7xxx/cam.h b/drivers/scsi/aic7xxx/cam.h index d40ba0760c76..26f17e3fc45c 100644 --- a/drivers/scsi/aic7xxx/cam.h +++ b/drivers/scsi/aic7xxx/cam.h | |||
@@ -103,9 +103,9 @@ typedef enum { | |||
103 | } ac_code; | 103 | } ac_code; |
104 | 104 | ||
105 | typedef enum { | 105 | typedef enum { |
106 | CAM_DIR_IN = SCSI_DATA_READ, | 106 | CAM_DIR_IN = DMA_FROM_DEVICE, |
107 | CAM_DIR_OUT = SCSI_DATA_WRITE, | 107 | CAM_DIR_OUT = DMA_TO_DEVICE, |
108 | CAM_DIR_NONE = SCSI_DATA_NONE | 108 | CAM_DIR_NONE = DMA_NONE, |
109 | } ccb_flags; | 109 | } ccb_flags; |
110 | 110 | ||
111 | #endif /* _AIC7XXX_CAM_H */ | 111 | #endif /* _AIC7XXX_CAM_H */ |