diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_proc.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_proc.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c index 5fece859fbd9..9c7f1056710d 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_proc.c +++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c | |||
@@ -50,7 +50,7 @@ static void ahc_dump_target_state(struct ahc_softc *ahc, | |||
50 | u_int our_id, char channel, | 50 | u_int our_id, char channel, |
51 | u_int target_id, u_int target_offset); | 51 | u_int target_id, u_int target_offset); |
52 | static void ahc_dump_device_state(struct info_str *info, | 52 | static void ahc_dump_device_state(struct info_str *info, |
53 | struct ahc_linux_device *dev); | 53 | struct scsi_device *dev); |
54 | static int ahc_proc_write_seeprom(struct ahc_softc *ahc, | 54 | static int ahc_proc_write_seeprom(struct ahc_softc *ahc, |
55 | char *buffer, int length); | 55 | char *buffer, int length); |
56 | 56 | ||
@@ -142,6 +142,7 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info, | |||
142 | u_int target_offset) | 142 | u_int target_offset) |
143 | { | 143 | { |
144 | struct ahc_linux_target *targ; | 144 | struct ahc_linux_target *targ; |
145 | struct scsi_target *starget; | ||
145 | struct ahc_initiator_tinfo *tinfo; | 146 | struct ahc_initiator_tinfo *tinfo; |
146 | struct ahc_tmode_tstate *tstate; | 147 | struct ahc_tmode_tstate *tstate; |
147 | int lun; | 148 | int lun; |
@@ -153,7 +154,8 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info, | |||
153 | copy_info(info, "Target %d Negotiation Settings\n", target_id); | 154 | copy_info(info, "Target %d Negotiation Settings\n", target_id); |
154 | copy_info(info, "\tUser: "); | 155 | copy_info(info, "\tUser: "); |
155 | ahc_format_transinfo(info, &tinfo->user); | 156 | ahc_format_transinfo(info, &tinfo->user); |
156 | targ = ahc->platform_data->targets[target_offset]; | 157 | starget = ahc->platform_data->starget[target_offset]; |
158 | targ = scsi_transport_target_data(starget); | ||
157 | if (targ == NULL) | 159 | if (targ == NULL) |
158 | return; | 160 | return; |
159 | 161 | ||
@@ -163,22 +165,25 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info, | |||
163 | ahc_format_transinfo(info, &tinfo->curr); | 165 | ahc_format_transinfo(info, &tinfo->curr); |
164 | 166 | ||
165 | for (lun = 0; lun < AHC_NUM_LUNS; lun++) { | 167 | for (lun = 0; lun < AHC_NUM_LUNS; lun++) { |
166 | struct ahc_linux_device *dev; | 168 | struct scsi_device *sdev; |
167 | 169 | ||
168 | dev = targ->devices[lun]; | 170 | sdev = targ->sdev[lun]; |
169 | 171 | ||
170 | if (dev == NULL) | 172 | if (sdev == NULL) |
171 | continue; | 173 | continue; |
172 | 174 | ||
173 | ahc_dump_device_state(info, dev); | 175 | ahc_dump_device_state(info, sdev); |
174 | } | 176 | } |
175 | } | 177 | } |
176 | 178 | ||
177 | static void | 179 | static void |
178 | ahc_dump_device_state(struct info_str *info, struct ahc_linux_device *dev) | 180 | ahc_dump_device_state(struct info_str *info, struct scsi_device *sdev) |
179 | { | 181 | { |
182 | struct ahc_linux_device *dev = scsi_transport_device_data(sdev); | ||
183 | |||
180 | copy_info(info, "\tChannel %c Target %d Lun %d Settings\n", | 184 | copy_info(info, "\tChannel %c Target %d Lun %d Settings\n", |
181 | dev->target->channel + 'A', dev->target->target, dev->lun); | 185 | sdev->sdev_target->channel + 'A', |
186 | sdev->sdev_target->id, sdev->lun); | ||
182 | 187 | ||
183 | copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued); | 188 | copy_info(info, "\t\tCommands Queued %ld\n", dev->commands_issued); |
184 | copy_info(info, "\t\tCommands Active %d\n", dev->active); | 189 | copy_info(info, "\t\tCommands Active %d\n", dev->active); |