diff options
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_core.c | 12 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_inline.h | 32 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.h | 102 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_pci.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_inline.h | 5 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.h | 104 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_pci.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aiclib.h | 4 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.h | 6 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_hipd.h | 6 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_malloc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_misc.h | 18 |
13 files changed, 146 insertions, 151 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index bdad54ec088c..63b521d615f2 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c | |||
@@ -1034,7 +1034,7 @@ ahd_intr(struct ahd_softc *ahd) | |||
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | /******************************** Private Inlines *****************************/ | 1036 | /******************************** Private Inlines *****************************/ |
1037 | static __inline void | 1037 | static inline void |
1038 | ahd_assert_atn(struct ahd_softc *ahd) | 1038 | ahd_assert_atn(struct ahd_softc *ahd) |
1039 | { | 1039 | { |
1040 | ahd_outb(ahd, SCSISIGO, ATNO); | 1040 | ahd_outb(ahd, SCSISIGO, ATNO); |
@@ -1069,7 +1069,7 @@ ahd_currently_packetized(struct ahd_softc *ahd) | |||
1069 | return (packetized); | 1069 | return (packetized); |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | static __inline int | 1072 | static inline int |
1073 | ahd_set_active_fifo(struct ahd_softc *ahd) | 1073 | ahd_set_active_fifo(struct ahd_softc *ahd) |
1074 | { | 1074 | { |
1075 | u_int active_fifo; | 1075 | u_int active_fifo; |
@@ -1086,7 +1086,7 @@ ahd_set_active_fifo(struct ahd_softc *ahd) | |||
1086 | } | 1086 | } |
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | static __inline void | 1089 | static inline void |
1090 | ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl) | 1090 | ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl) |
1091 | { | 1091 | { |
1092 | ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL); | 1092 | ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL); |
@@ -1096,7 +1096,7 @@ ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl) | |||
1096 | * Determine whether the sequencer reported a residual | 1096 | * Determine whether the sequencer reported a residual |
1097 | * for this SCB/transaction. | 1097 | * for this SCB/transaction. |
1098 | */ | 1098 | */ |
1099 | static __inline void | 1099 | static inline void |
1100 | ahd_update_residual(struct ahd_softc *ahd, struct scb *scb) | 1100 | ahd_update_residual(struct ahd_softc *ahd, struct scb *scb) |
1101 | { | 1101 | { |
1102 | uint32_t sgptr; | 1102 | uint32_t sgptr; |
@@ -1106,7 +1106,7 @@ ahd_update_residual(struct ahd_softc *ahd, struct scb *scb) | |||
1106 | ahd_calc_residual(ahd, scb); | 1106 | ahd_calc_residual(ahd, scb); |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | static __inline void | 1109 | static inline void |
1110 | ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb) | 1110 | ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb) |
1111 | { | 1111 | { |
1112 | uint32_t sgptr; | 1112 | uint32_t sgptr; |
@@ -7987,7 +7987,7 @@ ahd_resume(struct ahd_softc *ahd) | |||
7987 | * scbid that should be restored once manipualtion | 7987 | * scbid that should be restored once manipualtion |
7988 | * of the TCL entry is complete. | 7988 | * of the TCL entry is complete. |
7989 | */ | 7989 | */ |
7990 | static __inline u_int | 7990 | static inline u_int |
7991 | ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl) | 7991 | ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl) |
7992 | { | 7992 | { |
7993 | /* | 7993 | /* |
diff --git a/drivers/scsi/aic7xxx/aic79xx_inline.h b/drivers/scsi/aic7xxx/aic79xx_inline.h index 5f12cf9d99d0..09335a3c8691 100644 --- a/drivers/scsi/aic7xxx/aic79xx_inline.h +++ b/drivers/scsi/aic7xxx/aic79xx_inline.h | |||
@@ -46,21 +46,20 @@ | |||
46 | #define _AIC79XX_INLINE_H_ | 46 | #define _AIC79XX_INLINE_H_ |
47 | 47 | ||
48 | /******************************** Debugging ***********************************/ | 48 | /******************************** Debugging ***********************************/ |
49 | static __inline char *ahd_name(struct ahd_softc *ahd); | 49 | static inline char *ahd_name(struct ahd_softc *ahd); |
50 | 50 | ||
51 | static __inline char * | 51 | static inline char *ahd_name(struct ahd_softc *ahd) |
52 | ahd_name(struct ahd_softc *ahd) | ||
53 | { | 52 | { |
54 | return (ahd->name); | 53 | return (ahd->name); |
55 | } | 54 | } |
56 | 55 | ||
57 | /************************ Sequencer Execution Control *************************/ | 56 | /************************ Sequencer Execution Control *************************/ |
58 | static __inline void ahd_known_modes(struct ahd_softc *ahd, | 57 | static inline void ahd_known_modes(struct ahd_softc *ahd, |
59 | ahd_mode src, ahd_mode dst); | 58 | ahd_mode src, ahd_mode dst); |
60 | static __inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd, | 59 | static inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd, |
61 | ahd_mode src, | 60 | ahd_mode src, |
62 | ahd_mode dst); | 61 | ahd_mode dst); |
63 | static __inline void ahd_extract_mode_state(struct ahd_softc *ahd, | 62 | static inline void ahd_extract_mode_state(struct ahd_softc *ahd, |
64 | ahd_mode_state state, | 63 | ahd_mode_state state, |
65 | ahd_mode *src, ahd_mode *dst); | 64 | ahd_mode *src, ahd_mode *dst); |
66 | 65 | ||
@@ -73,7 +72,7 @@ int ahd_is_paused(struct ahd_softc *ahd); | |||
73 | void ahd_pause(struct ahd_softc *ahd); | 72 | void ahd_pause(struct ahd_softc *ahd); |
74 | void ahd_unpause(struct ahd_softc *ahd); | 73 | void ahd_unpause(struct ahd_softc *ahd); |
75 | 74 | ||
76 | static __inline void | 75 | static inline void |
77 | ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) | 76 | ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) |
78 | { | 77 | { |
79 | ahd->src_mode = src; | 78 | ahd->src_mode = src; |
@@ -82,13 +81,13 @@ ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) | |||
82 | ahd->saved_dst_mode = dst; | 81 | ahd->saved_dst_mode = dst; |
83 | } | 82 | } |
84 | 83 | ||
85 | static __inline ahd_mode_state | 84 | static inline ahd_mode_state |
86 | ahd_build_mode_state(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) | 85 | ahd_build_mode_state(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) |
87 | { | 86 | { |
88 | return ((src << SRC_MODE_SHIFT) | (dst << DST_MODE_SHIFT)); | 87 | return ((src << SRC_MODE_SHIFT) | (dst << DST_MODE_SHIFT)); |
89 | } | 88 | } |
90 | 89 | ||
91 | static __inline void | 90 | static inline void |
92 | ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state, | 91 | ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state, |
93 | ahd_mode *src, ahd_mode *dst) | 92 | ahd_mode *src, ahd_mode *dst) |
94 | { | 93 | { |
@@ -102,13 +101,12 @@ void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb, | |||
102 | bus_size_t len, int last); | 101 | bus_size_t len, int last); |
103 | 102 | ||
104 | /************************** Memory mapping routines ***************************/ | 103 | /************************** Memory mapping routines ***************************/ |
105 | static __inline size_t ahd_sg_size(struct ahd_softc *ahd); | 104 | static inline size_t ahd_sg_size(struct ahd_softc *ahd); |
106 | 105 | ||
107 | void ahd_sync_sglist(struct ahd_softc *ahd, | 106 | void ahd_sync_sglist(struct ahd_softc *ahd, |
108 | struct scb *scb, int op); | 107 | struct scb *scb, int op); |
109 | 108 | ||
110 | static __inline size_t | 109 | static inline size_t ahd_sg_size(struct ahd_softc *ahd) |
111 | ahd_sg_size(struct ahd_softc *ahd) | ||
112 | { | 110 | { |
113 | if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) | 111 | if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) |
114 | return (sizeof(struct ahd_dma64_seg)); | 112 | return (sizeof(struct ahd_dma64_seg)); |
@@ -141,11 +139,9 @@ struct scb * | |||
141 | ahd_lookup_scb(struct ahd_softc *ahd, u_int tag); | 139 | ahd_lookup_scb(struct ahd_softc *ahd, u_int tag); |
142 | void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb); | 140 | void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb); |
143 | 141 | ||
144 | static __inline uint8_t * | 142 | static inline uint8_t *ahd_get_sense_buf(struct ahd_softc *ahd, |
145 | ahd_get_sense_buf(struct ahd_softc *ahd, | ||
146 | struct scb *scb); | 143 | struct scb *scb); |
147 | static __inline uint32_t | 144 | static inline uint32_t ahd_get_sense_bufaddr(struct ahd_softc *ahd, |
148 | ahd_get_sense_bufaddr(struct ahd_softc *ahd, | ||
149 | struct scb *scb); | 145 | struct scb *scb); |
150 | 146 | ||
151 | #if 0 /* unused */ | 147 | #if 0 /* unused */ |
@@ -158,13 +154,13 @@ do { \ | |||
158 | 154 | ||
159 | #endif | 155 | #endif |
160 | 156 | ||
161 | static __inline uint8_t * | 157 | static inline uint8_t * |
162 | ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb) | 158 | ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb) |
163 | { | 159 | { |
164 | return (scb->sense_data); | 160 | return (scb->sense_data); |
165 | } | 161 | } |
166 | 162 | ||
167 | static __inline uint32_t | 163 | static inline uint32_t |
168 | ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb) | 164 | ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb) |
169 | { | 165 | { |
170 | return (scb->sense_busaddr); | 166 | return (scb->sense_busaddr); |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h index 8d6612c19922..55c1fe07969f 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.h +++ b/drivers/scsi/aic7xxx/aic79xx_osm.h | |||
@@ -395,19 +395,19 @@ struct info_str { | |||
395 | }; | 395 | }; |
396 | 396 | ||
397 | /******************************** Locking *************************************/ | 397 | /******************************** Locking *************************************/ |
398 | static __inline void | 398 | static inline void |
399 | ahd_lockinit(struct ahd_softc *ahd) | 399 | ahd_lockinit(struct ahd_softc *ahd) |
400 | { | 400 | { |
401 | spin_lock_init(&ahd->platform_data->spin_lock); | 401 | spin_lock_init(&ahd->platform_data->spin_lock); |
402 | } | 402 | } |
403 | 403 | ||
404 | static __inline void | 404 | static inline void |
405 | ahd_lock(struct ahd_softc *ahd, unsigned long *flags) | 405 | ahd_lock(struct ahd_softc *ahd, unsigned long *flags) |
406 | { | 406 | { |
407 | spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags); | 407 | spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags); |
408 | } | 408 | } |
409 | 409 | ||
410 | static __inline void | 410 | static inline void |
411 | ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) | 411 | ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) |
412 | { | 412 | { |
413 | spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags); | 413 | spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags); |
@@ -490,29 +490,29 @@ void ahd_pci_write_config(ahd_dev_softc_t pci, | |||
490 | int reg, uint32_t value, | 490 | int reg, uint32_t value, |
491 | int width); | 491 | int width); |
492 | 492 | ||
493 | static __inline int ahd_get_pci_function(ahd_dev_softc_t); | 493 | static inline int ahd_get_pci_function(ahd_dev_softc_t); |
494 | static __inline int | 494 | static inline int |
495 | ahd_get_pci_function(ahd_dev_softc_t pci) | 495 | ahd_get_pci_function(ahd_dev_softc_t pci) |
496 | { | 496 | { |
497 | return (PCI_FUNC(pci->devfn)); | 497 | return (PCI_FUNC(pci->devfn)); |
498 | } | 498 | } |
499 | 499 | ||
500 | static __inline int ahd_get_pci_slot(ahd_dev_softc_t); | 500 | static inline int ahd_get_pci_slot(ahd_dev_softc_t); |
501 | static __inline int | 501 | static inline int |
502 | ahd_get_pci_slot(ahd_dev_softc_t pci) | 502 | ahd_get_pci_slot(ahd_dev_softc_t pci) |
503 | { | 503 | { |
504 | return (PCI_SLOT(pci->devfn)); | 504 | return (PCI_SLOT(pci->devfn)); |
505 | } | 505 | } |
506 | 506 | ||
507 | static __inline int ahd_get_pci_bus(ahd_dev_softc_t); | 507 | static inline int ahd_get_pci_bus(ahd_dev_softc_t); |
508 | static __inline int | 508 | static inline int |
509 | ahd_get_pci_bus(ahd_dev_softc_t pci) | 509 | ahd_get_pci_bus(ahd_dev_softc_t pci) |
510 | { | 510 | { |
511 | return (pci->bus->number); | 511 | return (pci->bus->number); |
512 | } | 512 | } |
513 | 513 | ||
514 | static __inline void ahd_flush_device_writes(struct ahd_softc *); | 514 | static inline void ahd_flush_device_writes(struct ahd_softc *); |
515 | static __inline void | 515 | static inline void |
516 | ahd_flush_device_writes(struct ahd_softc *ahd) | 516 | ahd_flush_device_writes(struct ahd_softc *ahd) |
517 | { | 517 | { |
518 | /* XXX Is this sufficient for all architectures??? */ | 518 | /* XXX Is this sufficient for all architectures??? */ |
@@ -524,81 +524,81 @@ int ahd_linux_proc_info(struct Scsi_Host *, char *, char **, | |||
524 | off_t, int, int); | 524 | off_t, int, int); |
525 | 525 | ||
526 | /*********************** Transaction Access Wrappers **************************/ | 526 | /*********************** Transaction Access Wrappers **************************/ |
527 | static __inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); | 527 | static inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); |
528 | static __inline void ahd_set_transaction_status(struct scb *, uint32_t); | 528 | static inline void ahd_set_transaction_status(struct scb *, uint32_t); |
529 | static __inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); | 529 | static inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); |
530 | static __inline void ahd_set_scsi_status(struct scb *, uint32_t); | 530 | static inline void ahd_set_scsi_status(struct scb *, uint32_t); |
531 | static __inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd); | 531 | static inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd); |
532 | static __inline uint32_t ahd_get_transaction_status(struct scb *); | 532 | static inline uint32_t ahd_get_transaction_status(struct scb *); |
533 | static __inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd); | 533 | static inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd); |
534 | static __inline uint32_t ahd_get_scsi_status(struct scb *); | 534 | static inline uint32_t ahd_get_scsi_status(struct scb *); |
535 | static __inline void ahd_set_transaction_tag(struct scb *, int, u_int); | 535 | static inline void ahd_set_transaction_tag(struct scb *, int, u_int); |
536 | static __inline u_long ahd_get_transfer_length(struct scb *); | 536 | static inline u_long ahd_get_transfer_length(struct scb *); |
537 | static __inline int ahd_get_transfer_dir(struct scb *); | 537 | static inline int ahd_get_transfer_dir(struct scb *); |
538 | static __inline void ahd_set_residual(struct scb *, u_long); | 538 | static inline void ahd_set_residual(struct scb *, u_long); |
539 | static __inline void ahd_set_sense_residual(struct scb *scb, u_long resid); | 539 | static inline void ahd_set_sense_residual(struct scb *scb, u_long resid); |
540 | static __inline u_long ahd_get_residual(struct scb *); | 540 | static inline u_long ahd_get_residual(struct scb *); |
541 | static __inline u_long ahd_get_sense_residual(struct scb *); | 541 | static inline u_long ahd_get_sense_residual(struct scb *); |
542 | static __inline int ahd_perform_autosense(struct scb *); | 542 | static inline int ahd_perform_autosense(struct scb *); |
543 | static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *, | 543 | static inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *, |
544 | struct scb *); | 544 | struct scb *); |
545 | static __inline void ahd_notify_xfer_settings_change(struct ahd_softc *, | 545 | static inline void ahd_notify_xfer_settings_change(struct ahd_softc *, |
546 | struct ahd_devinfo *); | 546 | struct ahd_devinfo *); |
547 | static __inline void ahd_platform_scb_free(struct ahd_softc *ahd, | 547 | static inline void ahd_platform_scb_free(struct ahd_softc *ahd, |
548 | struct scb *scb); | 548 | struct scb *scb); |
549 | static __inline void ahd_freeze_scb(struct scb *scb); | 549 | static inline void ahd_freeze_scb(struct scb *scb); |
550 | 550 | ||
551 | static __inline | 551 | static inline |
552 | void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) | 552 | void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) |
553 | { | 553 | { |
554 | cmd->result &= ~(CAM_STATUS_MASK << 16); | 554 | cmd->result &= ~(CAM_STATUS_MASK << 16); |
555 | cmd->result |= status << 16; | 555 | cmd->result |= status << 16; |
556 | } | 556 | } |
557 | 557 | ||
558 | static __inline | 558 | static inline |
559 | void ahd_set_transaction_status(struct scb *scb, uint32_t status) | 559 | void ahd_set_transaction_status(struct scb *scb, uint32_t status) |
560 | { | 560 | { |
561 | ahd_cmd_set_transaction_status(scb->io_ctx,status); | 561 | ahd_cmd_set_transaction_status(scb->io_ctx,status); |
562 | } | 562 | } |
563 | 563 | ||
564 | static __inline | 564 | static inline |
565 | void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) | 565 | void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) |
566 | { | 566 | { |
567 | cmd->result &= ~0xFFFF; | 567 | cmd->result &= ~0xFFFF; |
568 | cmd->result |= status; | 568 | cmd->result |= status; |
569 | } | 569 | } |
570 | 570 | ||
571 | static __inline | 571 | static inline |
572 | void ahd_set_scsi_status(struct scb *scb, uint32_t status) | 572 | void ahd_set_scsi_status(struct scb *scb, uint32_t status) |
573 | { | 573 | { |
574 | ahd_cmd_set_scsi_status(scb->io_ctx, status); | 574 | ahd_cmd_set_scsi_status(scb->io_ctx, status); |
575 | } | 575 | } |
576 | 576 | ||
577 | static __inline | 577 | static inline |
578 | uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) | 578 | uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) |
579 | { | 579 | { |
580 | return ((cmd->result >> 16) & CAM_STATUS_MASK); | 580 | return ((cmd->result >> 16) & CAM_STATUS_MASK); |
581 | } | 581 | } |
582 | 582 | ||
583 | static __inline | 583 | static inline |
584 | uint32_t ahd_get_transaction_status(struct scb *scb) | 584 | uint32_t ahd_get_transaction_status(struct scb *scb) |
585 | { | 585 | { |
586 | return (ahd_cmd_get_transaction_status(scb->io_ctx)); | 586 | return (ahd_cmd_get_transaction_status(scb->io_ctx)); |
587 | } | 587 | } |
588 | 588 | ||
589 | static __inline | 589 | static inline |
590 | uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) | 590 | uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) |
591 | { | 591 | { |
592 | return (cmd->result & 0xFFFF); | 592 | return (cmd->result & 0xFFFF); |
593 | } | 593 | } |
594 | 594 | ||
595 | static __inline | 595 | static inline |
596 | uint32_t ahd_get_scsi_status(struct scb *scb) | 596 | uint32_t ahd_get_scsi_status(struct scb *scb) |
597 | { | 597 | { |
598 | return (ahd_cmd_get_scsi_status(scb->io_ctx)); | 598 | return (ahd_cmd_get_scsi_status(scb->io_ctx)); |
599 | } | 599 | } |
600 | 600 | ||
601 | static __inline | 601 | static inline |
602 | void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) | 602 | void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) |
603 | { | 603 | { |
604 | /* | 604 | /* |
@@ -607,43 +607,43 @@ void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) | |||
607 | */ | 607 | */ |
608 | } | 608 | } |
609 | 609 | ||
610 | static __inline | 610 | static inline |
611 | u_long ahd_get_transfer_length(struct scb *scb) | 611 | u_long ahd_get_transfer_length(struct scb *scb) |
612 | { | 612 | { |
613 | return (scb->platform_data->xfer_len); | 613 | return (scb->platform_data->xfer_len); |
614 | } | 614 | } |
615 | 615 | ||
616 | static __inline | 616 | static inline |
617 | int ahd_get_transfer_dir(struct scb *scb) | 617 | int ahd_get_transfer_dir(struct scb *scb) |
618 | { | 618 | { |
619 | return (scb->io_ctx->sc_data_direction); | 619 | return (scb->io_ctx->sc_data_direction); |
620 | } | 620 | } |
621 | 621 | ||
622 | static __inline | 622 | static inline |
623 | void ahd_set_residual(struct scb *scb, u_long resid) | 623 | void ahd_set_residual(struct scb *scb, u_long resid) |
624 | { | 624 | { |
625 | scsi_set_resid(scb->io_ctx, resid); | 625 | scsi_set_resid(scb->io_ctx, resid); |
626 | } | 626 | } |
627 | 627 | ||
628 | static __inline | 628 | static inline |
629 | void ahd_set_sense_residual(struct scb *scb, u_long resid) | 629 | void ahd_set_sense_residual(struct scb *scb, u_long resid) |
630 | { | 630 | { |
631 | scb->platform_data->sense_resid = resid; | 631 | scb->platform_data->sense_resid = resid; |
632 | } | 632 | } |
633 | 633 | ||
634 | static __inline | 634 | static inline |
635 | u_long ahd_get_residual(struct scb *scb) | 635 | u_long ahd_get_residual(struct scb *scb) |
636 | { | 636 | { |
637 | return scsi_get_resid(scb->io_ctx); | 637 | return scsi_get_resid(scb->io_ctx); |
638 | } | 638 | } |
639 | 639 | ||
640 | static __inline | 640 | static inline |
641 | u_long ahd_get_sense_residual(struct scb *scb) | 641 | u_long ahd_get_sense_residual(struct scb *scb) |
642 | { | 642 | { |
643 | return (scb->platform_data->sense_resid); | 643 | return (scb->platform_data->sense_resid); |
644 | } | 644 | } |
645 | 645 | ||
646 | static __inline | 646 | static inline |
647 | int ahd_perform_autosense(struct scb *scb) | 647 | int ahd_perform_autosense(struct scb *scb) |
648 | { | 648 | { |
649 | /* | 649 | /* |
@@ -654,20 +654,20 @@ int ahd_perform_autosense(struct scb *scb) | |||
654 | return (1); | 654 | return (1); |
655 | } | 655 | } |
656 | 656 | ||
657 | static __inline uint32_t | 657 | static inline uint32_t |
658 | ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) | 658 | ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) |
659 | { | 659 | { |
660 | return (sizeof(struct scsi_sense_data)); | 660 | return (sizeof(struct scsi_sense_data)); |
661 | } | 661 | } |
662 | 662 | ||
663 | static __inline void | 663 | static inline void |
664 | ahd_notify_xfer_settings_change(struct ahd_softc *ahd, | 664 | ahd_notify_xfer_settings_change(struct ahd_softc *ahd, |
665 | struct ahd_devinfo *devinfo) | 665 | struct ahd_devinfo *devinfo) |
666 | { | 666 | { |
667 | /* Nothing to do here for linux */ | 667 | /* Nothing to do here for linux */ |
668 | } | 668 | } |
669 | 669 | ||
670 | static __inline void | 670 | static inline void |
671 | ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb) | 671 | ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb) |
672 | { | 672 | { |
673 | ahd->flags &= ~AHD_RESOURCE_SHORTAGE; | 673 | ahd->flags &= ~AHD_RESOURCE_SHORTAGE; |
@@ -678,7 +678,7 @@ void ahd_platform_free(struct ahd_softc *ahd); | |||
678 | void ahd_platform_init(struct ahd_softc *ahd); | 678 | void ahd_platform_init(struct ahd_softc *ahd); |
679 | void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); | 679 | void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); |
680 | 680 | ||
681 | static __inline void | 681 | static inline void |
682 | ahd_freeze_scb(struct scb *scb) | 682 | ahd_freeze_scb(struct scb *scb) |
683 | { | 683 | { |
684 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { | 684 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { |
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index b8423c428a14..90a04a37b4f7 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c | |||
@@ -51,7 +51,7 @@ | |||
51 | 51 | ||
52 | #include "aic79xx_pci.h" | 52 | #include "aic79xx_pci.h" |
53 | 53 | ||
54 | static __inline uint64_t | 54 | static inline uint64_t |
55 | ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) | 55 | ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) |
56 | { | 56 | { |
57 | uint64_t id; | 57 | uint64_t id; |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_inline.h b/drivers/scsi/aic7xxx/aic7xxx_inline.h index 09bf2f4d78d5..0b57b783ef41 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_inline.h +++ b/drivers/scsi/aic7xxx/aic7xxx_inline.h | |||
@@ -55,10 +55,9 @@ void ahc_sync_sglist(struct ahc_softc *ahc, | |||
55 | struct scb *scb, int op); | 55 | struct scb *scb, int op); |
56 | 56 | ||
57 | /******************************** Debugging ***********************************/ | 57 | /******************************** Debugging ***********************************/ |
58 | static __inline char *ahc_name(struct ahc_softc *ahc); | 58 | static inline char *ahc_name(struct ahc_softc *ahc); |
59 | 59 | ||
60 | static __inline char * | 60 | static inline char *ahc_name(struct ahc_softc *ahc) |
61 | ahc_name(struct ahc_softc *ahc) | ||
62 | { | 61 | { |
63 | return (ahc->name); | 62 | return (ahc->name); |
64 | } | 63 | } |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h index 3f7238db35e5..56f07e527b48 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.h +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h | |||
@@ -230,7 +230,7 @@ int ahc_dmamap_unload(struct ahc_softc *, bus_dma_tag_t, bus_dmamap_t); | |||
230 | #include "aic7xxx.h" | 230 | #include "aic7xxx.h" |
231 | 231 | ||
232 | /***************************** Timer Facilities *******************************/ | 232 | /***************************** Timer Facilities *******************************/ |
233 | static __inline void | 233 | static inline void |
234 | ahc_scb_timer_reset(struct scb *scb, u_int usec) | 234 | ahc_scb_timer_reset(struct scb *scb, u_int usec) |
235 | { | 235 | { |
236 | } | 236 | } |
@@ -401,19 +401,19 @@ struct info_str { | |||
401 | /******************************** Locking *************************************/ | 401 | /******************************** Locking *************************************/ |
402 | /* Lock protecting internal data structures */ | 402 | /* Lock protecting internal data structures */ |
403 | 403 | ||
404 | static __inline void | 404 | static inline void |
405 | ahc_lockinit(struct ahc_softc *ahc) | 405 | ahc_lockinit(struct ahc_softc *ahc) |
406 | { | 406 | { |
407 | spin_lock_init(&ahc->platform_data->spin_lock); | 407 | spin_lock_init(&ahc->platform_data->spin_lock); |
408 | } | 408 | } |
409 | 409 | ||
410 | static __inline void | 410 | static inline void |
411 | ahc_lock(struct ahc_softc *ahc, unsigned long *flags) | 411 | ahc_lock(struct ahc_softc *ahc, unsigned long *flags) |
412 | { | 412 | { |
413 | spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags); | 413 | spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags); |
414 | } | 414 | } |
415 | 415 | ||
416 | static __inline void | 416 | static inline void |
417 | ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) | 417 | ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) |
418 | { | 418 | { |
419 | spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags); | 419 | spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags); |
@@ -493,22 +493,22 @@ void ahc_pci_write_config(ahc_dev_softc_t pci, | |||
493 | int reg, uint32_t value, | 493 | int reg, uint32_t value, |
494 | int width); | 494 | int width); |
495 | 495 | ||
496 | static __inline int ahc_get_pci_function(ahc_dev_softc_t); | 496 | static inline int ahc_get_pci_function(ahc_dev_softc_t); |
497 | static __inline int | 497 | static inline int |
498 | ahc_get_pci_function(ahc_dev_softc_t pci) | 498 | ahc_get_pci_function(ahc_dev_softc_t pci) |
499 | { | 499 | { |
500 | return (PCI_FUNC(pci->devfn)); | 500 | return (PCI_FUNC(pci->devfn)); |
501 | } | 501 | } |
502 | 502 | ||
503 | static __inline int ahc_get_pci_slot(ahc_dev_softc_t); | 503 | static inline int ahc_get_pci_slot(ahc_dev_softc_t); |
504 | static __inline int | 504 | static inline int |
505 | ahc_get_pci_slot(ahc_dev_softc_t pci) | 505 | ahc_get_pci_slot(ahc_dev_softc_t pci) |
506 | { | 506 | { |
507 | return (PCI_SLOT(pci->devfn)); | 507 | return (PCI_SLOT(pci->devfn)); |
508 | } | 508 | } |
509 | 509 | ||
510 | static __inline int ahc_get_pci_bus(ahc_dev_softc_t); | 510 | static inline int ahc_get_pci_bus(ahc_dev_softc_t); |
511 | static __inline int | 511 | static inline int |
512 | ahc_get_pci_bus(ahc_dev_softc_t pci) | 512 | ahc_get_pci_bus(ahc_dev_softc_t pci) |
513 | { | 513 | { |
514 | return (pci->bus->number); | 514 | return (pci->bus->number); |
@@ -521,8 +521,8 @@ static inline void ahc_linux_pci_exit(void) { | |||
521 | } | 521 | } |
522 | #endif | 522 | #endif |
523 | 523 | ||
524 | static __inline void ahc_flush_device_writes(struct ahc_softc *); | 524 | static inline void ahc_flush_device_writes(struct ahc_softc *); |
525 | static __inline void | 525 | static inline void |
526 | ahc_flush_device_writes(struct ahc_softc *ahc) | 526 | ahc_flush_device_writes(struct ahc_softc *ahc) |
527 | { | 527 | { |
528 | /* XXX Is this sufficient for all architectures??? */ | 528 | /* XXX Is this sufficient for all architectures??? */ |
@@ -535,81 +535,81 @@ int ahc_linux_proc_info(struct Scsi_Host *, char *, char **, | |||
535 | 535 | ||
536 | /*************************** Domain Validation ********************************/ | 536 | /*************************** Domain Validation ********************************/ |
537 | /*********************** Transaction Access Wrappers *************************/ | 537 | /*********************** Transaction Access Wrappers *************************/ |
538 | static __inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); | 538 | static inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); |
539 | static __inline void ahc_set_transaction_status(struct scb *, uint32_t); | 539 | static inline void ahc_set_transaction_status(struct scb *, uint32_t); |
540 | static __inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); | 540 | static inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); |
541 | static __inline void ahc_set_scsi_status(struct scb *, uint32_t); | 541 | static inline void ahc_set_scsi_status(struct scb *, uint32_t); |
542 | static __inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd); | 542 | static inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd); |
543 | static __inline uint32_t ahc_get_transaction_status(struct scb *); | 543 | static inline uint32_t ahc_get_transaction_status(struct scb *); |
544 | static __inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd); | 544 | static inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd); |
545 | static __inline uint32_t ahc_get_scsi_status(struct scb *); | 545 | static inline uint32_t ahc_get_scsi_status(struct scb *); |
546 | static __inline void ahc_set_transaction_tag(struct scb *, int, u_int); | 546 | static inline void ahc_set_transaction_tag(struct scb *, int, u_int); |
547 | static __inline u_long ahc_get_transfer_length(struct scb *); | 547 | static inline u_long ahc_get_transfer_length(struct scb *); |
548 | static __inline int ahc_get_transfer_dir(struct scb *); | 548 | static inline int ahc_get_transfer_dir(struct scb *); |
549 | static __inline void ahc_set_residual(struct scb *, u_long); | 549 | static inline void ahc_set_residual(struct scb *, u_long); |
550 | static __inline void ahc_set_sense_residual(struct scb *scb, u_long resid); | 550 | static inline void ahc_set_sense_residual(struct scb *scb, u_long resid); |
551 | static __inline u_long ahc_get_residual(struct scb *); | 551 | static inline u_long ahc_get_residual(struct scb *); |
552 | static __inline u_long ahc_get_sense_residual(struct scb *); | 552 | static inline u_long ahc_get_sense_residual(struct scb *); |
553 | static __inline int ahc_perform_autosense(struct scb *); | 553 | static inline int ahc_perform_autosense(struct scb *); |
554 | static __inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *, | 554 | static inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *, |
555 | struct scb *); | 555 | struct scb *); |
556 | static __inline void ahc_notify_xfer_settings_change(struct ahc_softc *, | 556 | static inline void ahc_notify_xfer_settings_change(struct ahc_softc *, |
557 | struct ahc_devinfo *); | 557 | struct ahc_devinfo *); |
558 | static __inline void ahc_platform_scb_free(struct ahc_softc *ahc, | 558 | static inline void ahc_platform_scb_free(struct ahc_softc *ahc, |
559 | struct scb *scb); | 559 | struct scb *scb); |
560 | static __inline void ahc_freeze_scb(struct scb *scb); | 560 | static inline void ahc_freeze_scb(struct scb *scb); |
561 | 561 | ||
562 | static __inline | 562 | static inline |
563 | void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) | 563 | void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) |
564 | { | 564 | { |
565 | cmd->result &= ~(CAM_STATUS_MASK << 16); | 565 | cmd->result &= ~(CAM_STATUS_MASK << 16); |
566 | cmd->result |= status << 16; | 566 | cmd->result |= status << 16; |
567 | } | 567 | } |
568 | 568 | ||
569 | static __inline | 569 | static inline |
570 | void ahc_set_transaction_status(struct scb *scb, uint32_t status) | 570 | void ahc_set_transaction_status(struct scb *scb, uint32_t status) |
571 | { | 571 | { |
572 | ahc_cmd_set_transaction_status(scb->io_ctx,status); | 572 | ahc_cmd_set_transaction_status(scb->io_ctx,status); |
573 | } | 573 | } |
574 | 574 | ||
575 | static __inline | 575 | static inline |
576 | void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) | 576 | void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) |
577 | { | 577 | { |
578 | cmd->result &= ~0xFFFF; | 578 | cmd->result &= ~0xFFFF; |
579 | cmd->result |= status; | 579 | cmd->result |= status; |
580 | } | 580 | } |
581 | 581 | ||
582 | static __inline | 582 | static inline |
583 | void ahc_set_scsi_status(struct scb *scb, uint32_t status) | 583 | void ahc_set_scsi_status(struct scb *scb, uint32_t status) |
584 | { | 584 | { |
585 | ahc_cmd_set_scsi_status(scb->io_ctx, status); | 585 | ahc_cmd_set_scsi_status(scb->io_ctx, status); |
586 | } | 586 | } |
587 | 587 | ||
588 | static __inline | 588 | static inline |
589 | uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd) | 589 | uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd) |
590 | { | 590 | { |
591 | return ((cmd->result >> 16) & CAM_STATUS_MASK); | 591 | return ((cmd->result >> 16) & CAM_STATUS_MASK); |
592 | } | 592 | } |
593 | 593 | ||
594 | static __inline | 594 | static inline |
595 | uint32_t ahc_get_transaction_status(struct scb *scb) | 595 | uint32_t ahc_get_transaction_status(struct scb *scb) |
596 | { | 596 | { |
597 | return (ahc_cmd_get_transaction_status(scb->io_ctx)); | 597 | return (ahc_cmd_get_transaction_status(scb->io_ctx)); |
598 | } | 598 | } |
599 | 599 | ||
600 | static __inline | 600 | static inline |
601 | uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd) | 601 | uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd) |
602 | { | 602 | { |
603 | return (cmd->result & 0xFFFF); | 603 | return (cmd->result & 0xFFFF); |
604 | } | 604 | } |
605 | 605 | ||
606 | static __inline | 606 | static inline |
607 | uint32_t ahc_get_scsi_status(struct scb *scb) | 607 | uint32_t ahc_get_scsi_status(struct scb *scb) |
608 | { | 608 | { |
609 | return (ahc_cmd_get_scsi_status(scb->io_ctx)); | 609 | return (ahc_cmd_get_scsi_status(scb->io_ctx)); |
610 | } | 610 | } |
611 | 611 | ||
612 | static __inline | 612 | static inline |
613 | void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) | 613 | void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) |
614 | { | 614 | { |
615 | /* | 615 | /* |
@@ -618,43 +618,43 @@ void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) | |||
618 | */ | 618 | */ |
619 | } | 619 | } |
620 | 620 | ||
621 | static __inline | 621 | static inline |
622 | u_long ahc_get_transfer_length(struct scb *scb) | 622 | u_long ahc_get_transfer_length(struct scb *scb) |
623 | { | 623 | { |
624 | return (scb->platform_data->xfer_len); | 624 | return (scb->platform_data->xfer_len); |
625 | } | 625 | } |
626 | 626 | ||
627 | static __inline | 627 | static inline |
628 | int ahc_get_transfer_dir(struct scb *scb) | 628 | int ahc_get_transfer_dir(struct scb *scb) |
629 | { | 629 | { |
630 | return (scb->io_ctx->sc_data_direction); | 630 | return (scb->io_ctx->sc_data_direction); |
631 | } | 631 | } |
632 | 632 | ||
633 | static __inline | 633 | static inline |
634 | void ahc_set_residual(struct scb *scb, u_long resid) | 634 | void ahc_set_residual(struct scb *scb, u_long resid) |
635 | { | 635 | { |
636 | scsi_set_resid(scb->io_ctx, resid); | 636 | scsi_set_resid(scb->io_ctx, resid); |
637 | } | 637 | } |
638 | 638 | ||
639 | static __inline | 639 | static inline |
640 | void ahc_set_sense_residual(struct scb *scb, u_long resid) | 640 | void ahc_set_sense_residual(struct scb *scb, u_long resid) |
641 | { | 641 | { |
642 | scb->platform_data->sense_resid = resid; | 642 | scb->platform_data->sense_resid = resid; |
643 | } | 643 | } |
644 | 644 | ||
645 | static __inline | 645 | static inline |
646 | u_long ahc_get_residual(struct scb *scb) | 646 | u_long ahc_get_residual(struct scb *scb) |
647 | { | 647 | { |
648 | return scsi_get_resid(scb->io_ctx); | 648 | return scsi_get_resid(scb->io_ctx); |
649 | } | 649 | } |
650 | 650 | ||
651 | static __inline | 651 | static inline |
652 | u_long ahc_get_sense_residual(struct scb *scb) | 652 | u_long ahc_get_sense_residual(struct scb *scb) |
653 | { | 653 | { |
654 | return (scb->platform_data->sense_resid); | 654 | return (scb->platform_data->sense_resid); |
655 | } | 655 | } |
656 | 656 | ||
657 | static __inline | 657 | static inline |
658 | int ahc_perform_autosense(struct scb *scb) | 658 | int ahc_perform_autosense(struct scb *scb) |
659 | { | 659 | { |
660 | /* | 660 | /* |
@@ -665,20 +665,20 @@ int ahc_perform_autosense(struct scb *scb) | |||
665 | return (1); | 665 | return (1); |
666 | } | 666 | } |
667 | 667 | ||
668 | static __inline uint32_t | 668 | static inline uint32_t |
669 | ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb) | 669 | ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb) |
670 | { | 670 | { |
671 | return (sizeof(struct scsi_sense_data)); | 671 | return (sizeof(struct scsi_sense_data)); |
672 | } | 672 | } |
673 | 673 | ||
674 | static __inline void | 674 | static inline void |
675 | ahc_notify_xfer_settings_change(struct ahc_softc *ahc, | 675 | ahc_notify_xfer_settings_change(struct ahc_softc *ahc, |
676 | struct ahc_devinfo *devinfo) | 676 | struct ahc_devinfo *devinfo) |
677 | { | 677 | { |
678 | /* Nothing to do here for linux */ | 678 | /* Nothing to do here for linux */ |
679 | } | 679 | } |
680 | 680 | ||
681 | static __inline void | 681 | static inline void |
682 | ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb) | 682 | ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb) |
683 | { | 683 | { |
684 | } | 684 | } |
@@ -687,7 +687,7 @@ int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg); | |||
687 | void ahc_platform_free(struct ahc_softc *ahc); | 687 | void ahc_platform_free(struct ahc_softc *ahc); |
688 | void ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb); | 688 | void ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb); |
689 | 689 | ||
690 | static __inline void | 690 | static inline void |
691 | ahc_freeze_scb(struct scb *scb) | 691 | ahc_freeze_scb(struct scb *scb) |
692 | { | 692 | { |
693 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { | 693 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 4347c8dc459f..27014b9de126 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c | |||
@@ -54,7 +54,7 @@ | |||
54 | 54 | ||
55 | #include "aic7xxx_pci.h" | 55 | #include "aic7xxx_pci.h" |
56 | 56 | ||
57 | static __inline uint64_t | 57 | static inline uint64_t |
58 | ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) | 58 | ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor) |
59 | { | 59 | { |
60 | uint64_t id; | 60 | uint64_t id; |
diff --git a/drivers/scsi/aic7xxx/aiclib.h b/drivers/scsi/aic7xxx/aiclib.h index 3bfbf0fe1ec2..f8fd198aafbc 100644 --- a/drivers/scsi/aic7xxx/aiclib.h +++ b/drivers/scsi/aic7xxx/aiclib.h | |||
@@ -133,7 +133,7 @@ struct scsi_sense_data | |||
133 | #define SCSI_STATUS_TASK_ABORTED 0x40 | 133 | #define SCSI_STATUS_TASK_ABORTED 0x40 |
134 | 134 | ||
135 | /************************* Large Disk Handling ********************************/ | 135 | /************************* Large Disk Handling ********************************/ |
136 | static __inline int | 136 | static inline int |
137 | aic_sector_div(sector_t capacity, int heads, int sectors) | 137 | aic_sector_div(sector_t capacity, int heads, int sectors) |
138 | { | 138 | { |
139 | /* ugly, ugly sector_div calling convention.. */ | 139 | /* ugly, ugly sector_div calling convention.. */ |
@@ -141,7 +141,7 @@ aic_sector_div(sector_t capacity, int heads, int sectors) | |||
141 | return (int)capacity; | 141 | return (int)capacity; |
142 | } | 142 | } |
143 | 143 | ||
144 | static __inline uint32_t | 144 | static inline uint32_t |
145 | scsi_4btoul(uint8_t *bytes) | 145 | scsi_4btoul(uint8_t *bytes) |
146 | { | 146 | { |
147 | uint32_t rv; | 147 | uint32_t rv; |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h index 567fbe0b4f09..b80bf709f104 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.h +++ b/drivers/scsi/sym53c8xx_2/sym_glue.h | |||
@@ -234,7 +234,7 @@ static inline struct sym_hcb * sym_get_hcb(struct Scsi_Host *host) | |||
234 | /* | 234 | /* |
235 | * Set the status field of a CAM CCB. | 235 | * Set the status field of a CAM CCB. |
236 | */ | 236 | */ |
237 | static __inline void | 237 | static inline void |
238 | sym_set_cam_status(struct scsi_cmnd *cmd, int status) | 238 | sym_set_cam_status(struct scsi_cmnd *cmd, int status) |
239 | { | 239 | { |
240 | cmd->result &= ~(0xff << 16); | 240 | cmd->result &= ~(0xff << 16); |
@@ -244,7 +244,7 @@ sym_set_cam_status(struct scsi_cmnd *cmd, int status) | |||
244 | /* | 244 | /* |
245 | * Get the status field of a CAM CCB. | 245 | * Get the status field of a CAM CCB. |
246 | */ | 246 | */ |
247 | static __inline int | 247 | static inline int |
248 | sym_get_cam_status(struct scsi_cmnd *cmd) | 248 | sym_get_cam_status(struct scsi_cmnd *cmd) |
249 | { | 249 | { |
250 | return host_byte(cmd->result); | 250 | return host_byte(cmd->result); |
@@ -253,7 +253,7 @@ sym_get_cam_status(struct scsi_cmnd *cmd) | |||
253 | /* | 253 | /* |
254 | * Build CAM result for a successful IO and for a failed IO. | 254 | * Build CAM result for a successful IO and for a failed IO. |
255 | */ | 255 | */ |
256 | static __inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid) | 256 | static inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid) |
257 | { | 257 | { |
258 | scsi_set_resid(cmd, resid); | 258 | scsi_set_resid(cmd, resid); |
259 | cmd->result = (((DID_OK) << 16) + ((cp->ssss_status) & 0x7f)); | 259 | cmd->result = (((DID_OK) << 16) + ((cp->ssss_status) & 0x7f)); |
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index ccea7db59f49..ffa70d1ed182 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c | |||
@@ -602,7 +602,7 @@ sym_getsync(struct sym_hcb *np, u_char dt, u_char sfac, u_char *divp, u_char *fa | |||
602 | /* | 602 | /* |
603 | * Set initial io register bits from burst code. | 603 | * Set initial io register bits from burst code. |
604 | */ | 604 | */ |
605 | static __inline void sym_init_burst(struct sym_hcb *np, u_char bc) | 605 | static inline void sym_init_burst(struct sym_hcb *np, u_char bc) |
606 | { | 606 | { |
607 | np->rv_ctest4 &= ~0x80; | 607 | np->rv_ctest4 &= ~0x80; |
608 | np->rv_dmode &= ~(0x3 << 6); | 608 | np->rv_dmode &= ~(0x3 << 6); |
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h index 61d28fcfffbf..1588c90518d4 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.h +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h | |||
@@ -1096,7 +1096,7 @@ do { \ | |||
1096 | #elif SYM_CONF_DMA_ADDRESSING_MODE == 2 | 1096 | #elif SYM_CONF_DMA_ADDRESSING_MODE == 2 |
1097 | #define DMA_DAC_MASK DMA_64BIT_MASK | 1097 | #define DMA_DAC_MASK DMA_64BIT_MASK |
1098 | int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s); | 1098 | int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s); |
1099 | static __inline void | 1099 | static inline void |
1100 | sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len) | 1100 | sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len) |
1101 | { | 1101 | { |
1102 | u32 h = (badd>>32); | 1102 | u32 h = (badd>>32); |
@@ -1201,7 +1201,7 @@ dma_addr_t __vtobus(m_pool_ident_t dev_dmat, void *m); | |||
1201 | 1201 | ||
1202 | #define sym_m_pool_match(mp_id1, mp_id2) (mp_id1 == mp_id2) | 1202 | #define sym_m_pool_match(mp_id1, mp_id2) (mp_id1 == mp_id2) |
1203 | 1203 | ||
1204 | static __inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp) | 1204 | static inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp) |
1205 | { | 1205 | { |
1206 | void *vaddr = NULL; | 1206 | void *vaddr = NULL; |
1207 | dma_addr_t baddr = 0; | 1207 | dma_addr_t baddr = 0; |
@@ -1215,7 +1215,7 @@ static __inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp) | |||
1215 | return vaddr; | 1215 | return vaddr; |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | static __inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp) | 1218 | static inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp) |
1219 | { | 1219 | { |
1220 | dma_free_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp->vaddr, | 1220 | dma_free_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp->vaddr, |
1221 | vbp->baddr); | 1221 | vbp->baddr); |
diff --git a/drivers/scsi/sym53c8xx_2/sym_malloc.c b/drivers/scsi/sym53c8xx_2/sym_malloc.c index 92bf9b14a7a2..883cac10daf9 100644 --- a/drivers/scsi/sym53c8xx_2/sym_malloc.c +++ b/drivers/scsi/sym53c8xx_2/sym_malloc.c | |||
@@ -262,7 +262,7 @@ static void ___free_dma_mem_cluster(m_pool_p mp, void *m) | |||
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | /* Fetch the memory pool for a given pool id (i.e. DMA constraints) */ | 264 | /* Fetch the memory pool for a given pool id (i.e. DMA constraints) */ |
265 | static __inline m_pool_p ___get_dma_pool(m_pool_ident_t dev_dmat) | 265 | static inline m_pool_p ___get_dma_pool(m_pool_ident_t dev_dmat) |
266 | { | 266 | { |
267 | m_pool_p mp; | 267 | m_pool_p mp; |
268 | for (mp = mp0.next; | 268 | for (mp = mp0.next; |
diff --git a/drivers/scsi/sym53c8xx_2/sym_misc.h b/drivers/scsi/sym53c8xx_2/sym_misc.h index 430537183c18..96c15145902c 100644 --- a/drivers/scsi/sym53c8xx_2/sym_misc.h +++ b/drivers/scsi/sym53c8xx_2/sym_misc.h | |||
@@ -52,17 +52,17 @@ typedef struct sym_quehead { | |||
52 | (ptr)->flink = (ptr); (ptr)->blink = (ptr); \ | 52 | (ptr)->flink = (ptr); (ptr)->blink = (ptr); \ |
53 | } while (0) | 53 | } while (0) |
54 | 54 | ||
55 | static __inline struct sym_quehead *sym_que_first(struct sym_quehead *head) | 55 | static inline struct sym_quehead *sym_que_first(struct sym_quehead *head) |
56 | { | 56 | { |
57 | return (head->flink == head) ? 0 : head->flink; | 57 | return (head->flink == head) ? 0 : head->flink; |
58 | } | 58 | } |
59 | 59 | ||
60 | static __inline struct sym_quehead *sym_que_last(struct sym_quehead *head) | 60 | static inline struct sym_quehead *sym_que_last(struct sym_quehead *head) |
61 | { | 61 | { |
62 | return (head->blink == head) ? 0 : head->blink; | 62 | return (head->blink == head) ? 0 : head->blink; |
63 | } | 63 | } |
64 | 64 | ||
65 | static __inline void __sym_que_add(struct sym_quehead * new, | 65 | static inline void __sym_que_add(struct sym_quehead * new, |
66 | struct sym_quehead * blink, | 66 | struct sym_quehead * blink, |
67 | struct sym_quehead * flink) | 67 | struct sym_quehead * flink) |
68 | { | 68 | { |
@@ -72,19 +72,19 @@ static __inline void __sym_que_add(struct sym_quehead * new, | |||
72 | blink->flink = new; | 72 | blink->flink = new; |
73 | } | 73 | } |
74 | 74 | ||
75 | static __inline void __sym_que_del(struct sym_quehead * blink, | 75 | static inline void __sym_que_del(struct sym_quehead * blink, |
76 | struct sym_quehead * flink) | 76 | struct sym_quehead * flink) |
77 | { | 77 | { |
78 | flink->blink = blink; | 78 | flink->blink = blink; |
79 | blink->flink = flink; | 79 | blink->flink = flink; |
80 | } | 80 | } |
81 | 81 | ||
82 | static __inline int sym_que_empty(struct sym_quehead *head) | 82 | static inline int sym_que_empty(struct sym_quehead *head) |
83 | { | 83 | { |
84 | return head->flink == head; | 84 | return head->flink == head; |
85 | } | 85 | } |
86 | 86 | ||
87 | static __inline void sym_que_splice(struct sym_quehead *list, | 87 | static inline void sym_que_splice(struct sym_quehead *list, |
88 | struct sym_quehead *head) | 88 | struct sym_quehead *head) |
89 | { | 89 | { |
90 | struct sym_quehead *first = list->flink; | 90 | struct sym_quehead *first = list->flink; |
@@ -101,7 +101,7 @@ static __inline void sym_que_splice(struct sym_quehead *list, | |||
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | static __inline void sym_que_move(struct sym_quehead *orig, | 104 | static inline void sym_que_move(struct sym_quehead *orig, |
105 | struct sym_quehead *dest) | 105 | struct sym_quehead *dest) |
106 | { | 106 | { |
107 | struct sym_quehead *first, *last; | 107 | struct sym_quehead *first, *last; |
@@ -129,7 +129,7 @@ static __inline void sym_que_move(struct sym_quehead *orig, | |||
129 | 129 | ||
130 | #define sym_insque_head(new, head) __sym_que_add(new, head, (head)->flink) | 130 | #define sym_insque_head(new, head) __sym_que_add(new, head, (head)->flink) |
131 | 131 | ||
132 | static __inline struct sym_quehead *sym_remque_head(struct sym_quehead *head) | 132 | static inline struct sym_quehead *sym_remque_head(struct sym_quehead *head) |
133 | { | 133 | { |
134 | struct sym_quehead *elem = head->flink; | 134 | struct sym_quehead *elem = head->flink; |
135 | 135 | ||
@@ -142,7 +142,7 @@ static __inline struct sym_quehead *sym_remque_head(struct sym_quehead *head) | |||
142 | 142 | ||
143 | #define sym_insque_tail(new, head) __sym_que_add(new, (head)->blink, head) | 143 | #define sym_insque_tail(new, head) __sym_que_add(new, (head)->blink, head) |
144 | 144 | ||
145 | static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head) | 145 | static inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head) |
146 | { | 146 | { |
147 | struct sym_quehead *elem = head->blink; | 147 | struct sym_quehead *elem = head->blink; |
148 | 148 | ||