aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-05-16 12:52:39 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 16:54:38 -0400
commit013791ee01754f83dbb4ccfd266381db74e120b5 (patch)
treeee111c4f8d5e6e2664a34ab8d730e2ecb25d894e
parent7dfa0f2673c17334c5de75a449f7bc161c9bd2c0 (diff)
[SCSI] aic7xxx: remove usage of obsolete typedefs
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c52
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.h36
-rw-r--r--drivers/scsi/aic7xxx/aiclib.c1
3 files changed, 38 insertions, 51 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 717401b26b6f..ff2a212c6e9c 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -426,12 +426,12 @@ static void ahc_linux_handle_scsi_status(struct ahc_softc *,
426 struct ahc_linux_device *, 426 struct ahc_linux_device *,
427 struct scb *); 427 struct scb *);
428static void ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, 428static void ahc_linux_queue_cmd_complete(struct ahc_softc *ahc,
429 Scsi_Cmnd *cmd); 429 struct scsi_cmnd *cmd);
430static void ahc_linux_sem_timeout(u_long arg); 430static void ahc_linux_sem_timeout(u_long arg);
431static void ahc_linux_freeze_simq(struct ahc_softc *ahc); 431static void ahc_linux_freeze_simq(struct ahc_softc *ahc);
432static void ahc_linux_release_simq(u_long arg); 432static void ahc_linux_release_simq(u_long arg);
433static void ahc_linux_dev_timed_unfreeze(u_long arg); 433static void ahc_linux_dev_timed_unfreeze(u_long arg);
434static int ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag); 434static int ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag);
435static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc); 435static void ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc);
436static void ahc_linux_thread_run_complete_queue(struct ahc_softc *ahc); 436static void ahc_linux_thread_run_complete_queue(struct ahc_softc *ahc);
437static u_int ahc_linux_user_tagdepth(struct ahc_softc *ahc, 437static u_int ahc_linux_user_tagdepth(struct ahc_softc *ahc,
@@ -512,7 +512,7 @@ ahc_linux_run_complete_queue(struct ahc_softc *ahc)
512 512
513 with_errors = 0; 513 with_errors = 0;
514 while ((acmd = TAILQ_FIRST(&ahc->platform_data->completeq)) != NULL) { 514 while ((acmd = TAILQ_FIRST(&ahc->platform_data->completeq)) != NULL) {
515 Scsi_Cmnd *cmd; 515 struct scsi_cmnd *cmd;
516 516
517 if (with_errors > AHC_LINUX_MAX_RETURNED_ERRORS) { 517 if (with_errors > AHC_LINUX_MAX_RETURNED_ERRORS) {
518 /* 518 /*
@@ -542,7 +542,7 @@ ahc_linux_run_complete_queue(struct ahc_softc *ahc)
542static __inline void 542static __inline void
543ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb) 543ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb)
544{ 544{
545 Scsi_Cmnd *cmd; 545 struct scsi_cmnd *cmd;
546 546
547 cmd = scb->io_ctx; 547 cmd = scb->io_ctx;
548 ahc_sync_sglist(ahc, scb, BUS_DMASYNC_POSTWRITE); 548 ahc_sync_sglist(ahc, scb, BUS_DMASYNC_POSTWRITE);
@@ -582,27 +582,11 @@ ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
582 return (consumed); 582 return (consumed);
583} 583}
584 584
585/************************ Host template entry points *************************/
586static int ahc_linux_detect(Scsi_Host_Template *);
587static int ahc_linux_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
588static const char *ahc_linux_info(struct Scsi_Host *);
589static int ahc_linux_slave_alloc(Scsi_Device *);
590static int ahc_linux_slave_configure(Scsi_Device *);
591static void ahc_linux_slave_destroy(Scsi_Device *);
592#if defined(__i386__)
593static int ahc_linux_biosparam(struct scsi_device*,
594 struct block_device*,
595 sector_t, int[]);
596#endif
597static int ahc_linux_bus_reset(Scsi_Cmnd *);
598static int ahc_linux_dev_reset(Scsi_Cmnd *);
599static int ahc_linux_abort(Scsi_Cmnd *);
600
601/* 585/*
602 * Try to detect an Adaptec 7XXX controller. 586 * Try to detect an Adaptec 7XXX controller.
603 */ 587 */
604static int 588static int
605ahc_linux_detect(Scsi_Host_Template *template) 589ahc_linux_detect(struct scsi_host_template *template)
606{ 590{
607 struct ahc_softc *ahc; 591 struct ahc_softc *ahc;
608 int found = 0; 592 int found = 0;
@@ -683,7 +667,7 @@ ahc_linux_info(struct Scsi_Host *host)
683 * Queue an SCB to the controller. 667 * Queue an SCB to the controller.
684 */ 668 */
685static int 669static int
686ahc_linux_queue(Scsi_Cmnd * cmd, void (*scsi_done) (Scsi_Cmnd *)) 670ahc_linux_queue(struct scsi_cmnd * cmd, void (*scsi_done) (struct scsi_cmnd *))
687{ 671{
688 struct ahc_softc *ahc; 672 struct ahc_softc *ahc;
689 struct ahc_linux_device *dev; 673 struct ahc_linux_device *dev;
@@ -714,7 +698,7 @@ ahc_linux_queue(Scsi_Cmnd * cmd, void (*scsi_done) (Scsi_Cmnd *))
714} 698}
715 699
716static int 700static int
717ahc_linux_slave_alloc(Scsi_Device *device) 701ahc_linux_slave_alloc(struct scsi_device *device)
718{ 702{
719 struct ahc_softc *ahc; 703 struct ahc_softc *ahc;
720 704
@@ -725,7 +709,7 @@ ahc_linux_slave_alloc(Scsi_Device *device)
725} 709}
726 710
727static int 711static int
728ahc_linux_slave_configure(Scsi_Device *device) 712ahc_linux_slave_configure(struct scsi_device *device)
729{ 713{
730 struct ahc_softc *ahc; 714 struct ahc_softc *ahc;
731 struct ahc_linux_device *dev; 715 struct ahc_linux_device *dev;
@@ -755,7 +739,7 @@ ahc_linux_slave_configure(Scsi_Device *device)
755} 739}
756 740
757static void 741static void
758ahc_linux_slave_destroy(Scsi_Device *device) 742ahc_linux_slave_destroy(struct scsi_device *device)
759{ 743{
760 struct ahc_softc *ahc; 744 struct ahc_softc *ahc;
761 struct ahc_linux_device *dev; 745 struct ahc_linux_device *dev;
@@ -836,7 +820,7 @@ ahc_linux_biosparam(struct scsi_device *sdev, struct block_device *bdev,
836 * Abort the current SCSI command(s). 820 * Abort the current SCSI command(s).
837 */ 821 */
838static int 822static int
839ahc_linux_abort(Scsi_Cmnd *cmd) 823ahc_linux_abort(struct scsi_cmnd *cmd)
840{ 824{
841 int error; 825 int error;
842 826
@@ -850,7 +834,7 @@ ahc_linux_abort(Scsi_Cmnd *cmd)
850 * Attempt to send a target reset message to the device that timed out. 834 * Attempt to send a target reset message to the device that timed out.
851 */ 835 */
852static int 836static int
853ahc_linux_dev_reset(Scsi_Cmnd *cmd) 837ahc_linux_dev_reset(struct scsi_cmnd *cmd)
854{ 838{
855 int error; 839 int error;
856 840
@@ -864,7 +848,7 @@ ahc_linux_dev_reset(Scsi_Cmnd *cmd)
864 * Reset the SCSI bus. 848 * Reset the SCSI bus.
865 */ 849 */
866static int 850static int
867ahc_linux_bus_reset(Scsi_Cmnd *cmd) 851ahc_linux_bus_reset(struct scsi_cmnd *cmd)
868{ 852{
869 struct ahc_softc *ahc; 853 struct ahc_softc *ahc;
870 int found; 854 int found;
@@ -881,7 +865,7 @@ ahc_linux_bus_reset(Scsi_Cmnd *cmd)
881 return SUCCESS; 865 return SUCCESS;
882} 866}
883 867
884Scsi_Host_Template aic7xxx_driver_template = { 868struct scsi_host_template aic7xxx_driver_template = {
885 .module = THIS_MODULE, 869 .module = THIS_MODULE,
886 .name = "aic7xxx", 870 .name = "aic7xxx",
887 .proc_info = ahc_linux_proc_info, 871 .proc_info = ahc_linux_proc_info,
@@ -1189,7 +1173,7 @@ __setup("aic7xxx=", aic7xxx_setup);
1189uint32_t aic7xxx_verbose; 1173uint32_t aic7xxx_verbose;
1190 1174
1191int 1175int
1192ahc_linux_register_host(struct ahc_softc *ahc, Scsi_Host_Template *template) 1176ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template)
1193{ 1177{
1194 char buf[80]; 1178 char buf[80];
1195 struct Scsi_Host *host; 1179 struct Scsi_Host *host;
@@ -2017,7 +2001,7 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
2017void 2001void
2018ahc_done(struct ahc_softc *ahc, struct scb *scb) 2002ahc_done(struct ahc_softc *ahc, struct scb *scb)
2019{ 2003{
2020 Scsi_Cmnd *cmd; 2004 struct scsi_cmnd *cmd;
2021 struct ahc_linux_device *dev; 2005 struct ahc_linux_device *dev;
2022 2006
2023 LIST_REMOVE(scb, pending_links); 2007 LIST_REMOVE(scb, pending_links);
@@ -2171,7 +2155,7 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
2171 case SCSI_STATUS_CHECK_COND: 2155 case SCSI_STATUS_CHECK_COND:
2172 case SCSI_STATUS_CMD_TERMINATED: 2156 case SCSI_STATUS_CMD_TERMINATED:
2173 { 2157 {
2174 Scsi_Cmnd *cmd; 2158 struct scsi_cmnd *cmd;
2175 2159
2176 /* 2160 /*
2177 * Copy sense information to the OS's cmd 2161 * Copy sense information to the OS's cmd
@@ -2293,7 +2277,7 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc,
2293} 2277}
2294 2278
2295static void 2279static void
2296ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, Scsi_Cmnd *cmd) 2280ahc_linux_queue_cmd_complete(struct ahc_softc *ahc, struct scsi_cmnd *cmd)
2297{ 2281{
2298 /* 2282 /*
2299 * Typically, the complete queue has very few entries 2283 * Typically, the complete queue has very few entries
@@ -2482,7 +2466,7 @@ ahc_linux_dev_timed_unfreeze(u_long arg)
2482} 2466}
2483 2467
2484static int 2468static int
2485ahc_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag) 2469ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
2486{ 2470{
2487 struct ahc_softc *ahc; 2471 struct ahc_softc *ahc;
2488 struct ahc_linux_device *dev; 2472 struct ahc_linux_device *dev;
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
index 9cfb46b4b15f..2afd0521c4ad 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -59,6 +59,7 @@
59#ifndef _AIC7XXX_LINUX_H_ 59#ifndef _AIC7XXX_LINUX_H_
60#define _AIC7XXX_LINUX_H_ 60#define _AIC7XXX_LINUX_H_
61 61
62#include <linux/config.h>
62#include <linux/types.h> 63#include <linux/types.h>
63#include <linux/blkdev.h> 64#include <linux/blkdev.h>
64#include <linux/delay.h> 65#include <linux/delay.h>
@@ -68,16 +69,19 @@
68#include <linux/version.h> 69#include <linux/version.h>
69#include <linux/interrupt.h> 70#include <linux/interrupt.h>
70#include <linux/module.h> 71#include <linux/module.h>
72#include <linux/slab.h>
71#include <asm/byteorder.h> 73#include <asm/byteorder.h>
72#include <asm/io.h> 74#include <asm/io.h>
73 75
74#include <linux/config.h> 76#include <scsi/scsi.h>
75#include <linux/slab.h> 77#include <scsi/scsi_cmnd.h>
78#include <scsi/scsi_eh.h>
79#include <scsi/scsi_device.h>
80#include <scsi/scsi_host.h>
81#include <scsi/scsi_tcq.h>
76 82
77/* Core SCSI definitions */ 83/* Core SCSI definitions */
78#define AIC_LIB_PREFIX ahc 84#define AIC_LIB_PREFIX ahc
79#include "scsi.h"
80#include <scsi/scsi_host.h>
81 85
82/* Name space conflict with BSD queue macros */ 86/* Name space conflict with BSD queue macros */
83#ifdef LIST_HEAD 87#ifdef LIST_HEAD
@@ -106,7 +110,7 @@
106/************************* Forward Declarations *******************************/ 110/************************* Forward Declarations *******************************/
107struct ahc_softc; 111struct ahc_softc;
108typedef struct pci_dev *ahc_dev_softc_t; 112typedef struct pci_dev *ahc_dev_softc_t;
109typedef Scsi_Cmnd *ahc_io_ctx_t; 113typedef struct scsi_cmnd *ahc_io_ctx_t;
110 114
111/******************************* Byte Order ***********************************/ 115/******************************* Byte Order ***********************************/
112#define ahc_htobe16(x) cpu_to_be16(x) 116#define ahc_htobe16(x) cpu_to_be16(x)
@@ -144,7 +148,7 @@ typedef Scsi_Cmnd *ahc_io_ctx_t;
144extern u_int aic7xxx_no_probe; 148extern u_int aic7xxx_no_probe;
145extern u_int aic7xxx_allow_memio; 149extern u_int aic7xxx_allow_memio;
146extern int aic7xxx_detect_complete; 150extern int aic7xxx_detect_complete;
147extern Scsi_Host_Template aic7xxx_driver_template; 151extern struct scsi_host_template aic7xxx_driver_template;
148 152
149/***************************** Bus Space/DMA **********************************/ 153/***************************** Bus Space/DMA **********************************/
150 154
@@ -408,7 +412,7 @@ struct ahc_linux_device {
408#define AHC_OTAG_THRESH 500 412#define AHC_OTAG_THRESH 500
409 413
410 int lun; 414 int lun;
411 Scsi_Device *scsi_device; 415 struct scsi_device *scsi_device;
412 struct ahc_linux_target *target; 416 struct ahc_linux_target *target;
413}; 417};
414 418
@@ -564,7 +568,7 @@ ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count)
564 568
565/**************************** Initialization **********************************/ 569/**************************** Initialization **********************************/
566int ahc_linux_register_host(struct ahc_softc *, 570int ahc_linux_register_host(struct ahc_softc *,
567 Scsi_Host_Template *); 571 struct scsi_host_template *);
568 572
569uint64_t ahc_linux_get_memsize(void); 573uint64_t ahc_linux_get_memsize(void);
570 574
@@ -795,13 +799,13 @@ int ahc_linux_proc_info(struct Scsi_Host *, char *, char **,
795 799
796/*************************** Domain Validation ********************************/ 800/*************************** Domain Validation ********************************/
797/*********************** Transaction Access Wrappers *************************/ 801/*********************** Transaction Access Wrappers *************************/
798static __inline void ahc_cmd_set_transaction_status(Scsi_Cmnd *, uint32_t); 802static __inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
799static __inline void ahc_set_transaction_status(struct scb *, uint32_t); 803static __inline void ahc_set_transaction_status(struct scb *, uint32_t);
800static __inline void ahc_cmd_set_scsi_status(Scsi_Cmnd *, uint32_t); 804static __inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
801static __inline void ahc_set_scsi_status(struct scb *, uint32_t); 805static __inline void ahc_set_scsi_status(struct scb *, uint32_t);
802static __inline uint32_t ahc_cmd_get_transaction_status(Scsi_Cmnd *cmd); 806static __inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd);
803static __inline uint32_t ahc_get_transaction_status(struct scb *); 807static __inline uint32_t ahc_get_transaction_status(struct scb *);
804static __inline uint32_t ahc_cmd_get_scsi_status(Scsi_Cmnd *cmd); 808static __inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd);
805static __inline uint32_t ahc_get_scsi_status(struct scb *); 809static __inline uint32_t ahc_get_scsi_status(struct scb *);
806static __inline void ahc_set_transaction_tag(struct scb *, int, u_int); 810static __inline void ahc_set_transaction_tag(struct scb *, int, u_int);
807static __inline u_long ahc_get_transfer_length(struct scb *); 811static __inline u_long ahc_get_transfer_length(struct scb *);
@@ -820,7 +824,7 @@ static __inline void ahc_platform_scb_free(struct ahc_softc *ahc,
820static __inline void ahc_freeze_scb(struct scb *scb); 824static __inline void ahc_freeze_scb(struct scb *scb);
821 825
822static __inline 826static __inline
823void ahc_cmd_set_transaction_status(Scsi_Cmnd *cmd, uint32_t status) 827void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
824{ 828{
825 cmd->result &= ~(CAM_STATUS_MASK << 16); 829 cmd->result &= ~(CAM_STATUS_MASK << 16);
826 cmd->result |= status << 16; 830 cmd->result |= status << 16;
@@ -833,7 +837,7 @@ void ahc_set_transaction_status(struct scb *scb, uint32_t status)
833} 837}
834 838
835static __inline 839static __inline
836void ahc_cmd_set_scsi_status(Scsi_Cmnd *cmd, uint32_t status) 840void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
837{ 841{
838 cmd->result &= ~0xFFFF; 842 cmd->result &= ~0xFFFF;
839 cmd->result |= status; 843 cmd->result |= status;
@@ -846,7 +850,7 @@ void ahc_set_scsi_status(struct scb *scb, uint32_t status)
846} 850}
847 851
848static __inline 852static __inline
849uint32_t ahc_cmd_get_transaction_status(Scsi_Cmnd *cmd) 853uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd)
850{ 854{
851 return ((cmd->result >> 16) & CAM_STATUS_MASK); 855 return ((cmd->result >> 16) & CAM_STATUS_MASK);
852} 856}
@@ -858,7 +862,7 @@ uint32_t ahc_get_transaction_status(struct scb *scb)
858} 862}
859 863
860static __inline 864static __inline
861uint32_t ahc_cmd_get_scsi_status(Scsi_Cmnd *cmd) 865uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd)
862{ 866{
863 return (cmd->result & 0xFFFF); 867 return (cmd->result & 0xFFFF);
864} 868}
diff --git a/drivers/scsi/aic7xxx/aiclib.c b/drivers/scsi/aic7xxx/aiclib.c
index 79bfd9efd8ed..7c5a6db0e672 100644
--- a/drivers/scsi/aic7xxx/aiclib.c
+++ b/drivers/scsi/aic7xxx/aiclib.c
@@ -35,7 +35,6 @@
35#include <linux/version.h> 35#include <linux/version.h>
36 36
37/* Core SCSI definitions */ 37/* Core SCSI definitions */
38#include "scsi.h"
39#include <scsi/scsi_host.h> 38#include <scsi/scsi_host.h>
40#include "aiclib.h" 39#include "aiclib.h"
41#include "cam.h" 40#include "cam.h"