| .. | .. |
|---|
| 40 | 40 | * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#250 $ |
|---|
| 41 | 41 | */ |
|---|
| 42 | 42 | |
|---|
| 43 | | -#ifdef __linux__ |
|---|
| 44 | 43 | #include "aic79xx_osm.h" |
|---|
| 45 | 44 | #include "aic79xx_inline.h" |
|---|
| 46 | 45 | #include "aicasm/aicasm_insformat.h" |
|---|
| 47 | | -#else |
|---|
| 48 | | -#include <dev/aic7xxx/aic79xx_osm.h> |
|---|
| 49 | | -#include <dev/aic7xxx/aic79xx_inline.h> |
|---|
| 50 | | -#include <dev/aic7xxx/aicasm/aicasm_insformat.h> |
|---|
| 51 | | -#endif |
|---|
| 52 | | - |
|---|
| 53 | 46 | |
|---|
| 54 | 47 | /***************************** Lookup Tables **********************************/ |
|---|
| 55 | 48 | static const char *const ahd_chip_names[] = |
|---|
| .. | .. |
|---|
| 59 | 52 | "aic7902", |
|---|
| 60 | 53 | "aic7901A" |
|---|
| 61 | 54 | }; |
|---|
| 62 | | -static const u_int num_chip_names = ARRAY_SIZE(ahd_chip_names); |
|---|
| 63 | 55 | |
|---|
| 64 | 56 | /* |
|---|
| 65 | 57 | * Hardware error codes. |
|---|
| .. | .. |
|---|
| 1743 | 1735 | sg_list = (struct ahd_dma64_seg*)scb->sg_list; |
|---|
| 1744 | 1736 | for (i = 0; i < scb->sg_count; i++) { |
|---|
| 1745 | 1737 | uint64_t addr; |
|---|
| 1746 | | - uint32_t len; |
|---|
| 1747 | 1738 | |
|---|
| 1748 | 1739 | addr = ahd_le64toh(sg_list[i].addr); |
|---|
| 1749 | | - len = ahd_le32toh(sg_list[i].len); |
|---|
| 1750 | 1740 | printk("sg[%d] - Addr 0x%x%x : Length %d%s\n", |
|---|
| 1751 | 1741 | i, |
|---|
| 1752 | 1742 | (uint32_t)((addr >> 32) & 0xFFFFFFFF), |
|---|
| .. | .. |
|---|
| 1914 | 1904 | { |
|---|
| 1915 | 1905 | struct ahd_devinfo devinfo; |
|---|
| 1916 | 1906 | struct scb *scb; |
|---|
| 1917 | | - struct ahd_initiator_tinfo *targ_info; |
|---|
| 1918 | | - struct ahd_tmode_tstate *tstate; |
|---|
| 1919 | | - struct ahd_transinfo *tinfo; |
|---|
| 1920 | 1907 | u_int scbid; |
|---|
| 1921 | 1908 | |
|---|
| 1922 | 1909 | /* |
|---|
| .. | .. |
|---|
| 1944 | 1931 | SCB_GET_LUN(scb), |
|---|
| 1945 | 1932 | SCB_GET_CHANNEL(ahd, scb), |
|---|
| 1946 | 1933 | ROLE_INITIATOR); |
|---|
| 1947 | | - targ_info = ahd_fetch_transinfo(ahd, |
|---|
| 1948 | | - devinfo.channel, |
|---|
| 1949 | | - devinfo.our_scsiid, |
|---|
| 1950 | | - devinfo.target, |
|---|
| 1951 | | - &tstate); |
|---|
| 1952 | | - tinfo = &targ_info->curr; |
|---|
| 1953 | 1934 | ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, |
|---|
| 1954 | 1935 | AHD_TRANS_ACTIVE, /*paused*/TRUE); |
|---|
| 1955 | 1936 | ahd_set_syncrate(ahd, &devinfo, /*period*/0, |
|---|
| .. | .. |
|---|
| 2293 | 2274 | switch (scb->hscb->task_management) { |
|---|
| 2294 | 2275 | case SIU_TASKMGMT_ABORT_TASK: |
|---|
| 2295 | 2276 | tag = SCB_GET_TAG(scb); |
|---|
| 2277 | + fallthrough; |
|---|
| 2296 | 2278 | case SIU_TASKMGMT_ABORT_TASK_SET: |
|---|
| 2297 | 2279 | case SIU_TASKMGMT_CLEAR_TASK_SET: |
|---|
| 2298 | 2280 | lun = scb->hscb->lun; |
|---|
| .. | .. |
|---|
| 2303 | 2285 | break; |
|---|
| 2304 | 2286 | case SIU_TASKMGMT_LUN_RESET: |
|---|
| 2305 | 2287 | lun = scb->hscb->lun; |
|---|
| 2288 | + fallthrough; |
|---|
| 2306 | 2289 | case SIU_TASKMGMT_TARGET_RESET: |
|---|
| 2307 | 2290 | { |
|---|
| 2308 | 2291 | struct ahd_devinfo devinfo; |
|---|
| .. | .. |
|---|
| 2675 | 2658 | struct scb *scb; |
|---|
| 2676 | 2659 | u_int scbid; |
|---|
| 2677 | 2660 | u_int lqistat1; |
|---|
| 2678 | | - u_int lqistat2; |
|---|
| 2679 | 2661 | u_int msg_out; |
|---|
| 2680 | 2662 | u_int curphase; |
|---|
| 2681 | 2663 | u_int lastphase; |
|---|
| .. | .. |
|---|
| 2686 | 2668 | scb = NULL; |
|---|
| 2687 | 2669 | ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); |
|---|
| 2688 | 2670 | lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ); |
|---|
| 2689 | | - lqistat2 = ahd_inb(ahd, LQISTAT2); |
|---|
| 2671 | + ahd_inb(ahd, LQISTAT2); |
|---|
| 2690 | 2672 | if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0 |
|---|
| 2691 | 2673 | && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) { |
|---|
| 2692 | 2674 | u_int lqistate; |
|---|
| .. | .. |
|---|
| 3113 | 3095 | printerror = 0; |
|---|
| 3114 | 3096 | } else if (ahd_sent_msg(ahd, AHDMSG_1B, |
|---|
| 3115 | 3097 | MSG_BUS_DEV_RESET, TRUE)) { |
|---|
| 3116 | | -#ifdef __FreeBSD__ |
|---|
| 3117 | | - /* |
|---|
| 3118 | | - * Don't mark the user's request for this BDR |
|---|
| 3119 | | - * as completing with CAM_BDR_SENT. CAM3 |
|---|
| 3120 | | - * specifies CAM_REQ_CMP. |
|---|
| 3121 | | - */ |
|---|
| 3122 | | - if (scb != NULL |
|---|
| 3123 | | - && scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV |
|---|
| 3124 | | - && ahd_match_scb(ahd, scb, target, 'A', |
|---|
| 3125 | | - CAM_LUN_WILDCARD, SCB_LIST_NULL, |
|---|
| 3126 | | - ROLE_INITIATOR)) |
|---|
| 3127 | | - ahd_set_transaction_status(scb, CAM_REQ_CMP); |
|---|
| 3128 | | -#endif |
|---|
| 3129 | 3098 | ahd_handle_devreset(ahd, &devinfo, CAM_LUN_WILDCARD, |
|---|
| 3130 | 3099 | CAM_BDR_SENT, "Bus Device Reset", |
|---|
| 3131 | 3100 | /*verbose_level*/0); |
|---|
| .. | .. |
|---|
| 3681 | 3650 | return; |
|---|
| 3682 | 3651 | |
|---|
| 3683 | 3652 | tstate = ahd->enabled_targets[scsi_id]; |
|---|
| 3684 | | - if (tstate != NULL) |
|---|
| 3685 | | - kfree(tstate); |
|---|
| 3653 | + kfree(tstate); |
|---|
| 3686 | 3654 | ahd->enabled_targets[scsi_id] = NULL; |
|---|
| 3687 | 3655 | } |
|---|
| 3688 | 3656 | #endif |
|---|
| .. | .. |
|---|
| 3823 | 3791 | *bus_width = MSG_EXT_WDTR_BUS_16_BIT; |
|---|
| 3824 | 3792 | break; |
|---|
| 3825 | 3793 | } |
|---|
| 3826 | | - /* FALLTHROUGH */ |
|---|
| 3794 | + fallthrough; |
|---|
| 3827 | 3795 | case MSG_EXT_WDTR_BUS_8_BIT: |
|---|
| 3828 | 3796 | *bus_width = MSG_EXT_WDTR_BUS_8_BIT; |
|---|
| 3829 | 3797 | break; |
|---|
| .. | .. |
|---|
| 4238 | 4206 | pending_scb_count = 0; |
|---|
| 4239 | 4207 | LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { |
|---|
| 4240 | 4208 | struct ahd_devinfo devinfo; |
|---|
| 4241 | | - struct ahd_initiator_tinfo *tinfo; |
|---|
| 4242 | 4209 | struct ahd_tmode_tstate *tstate; |
|---|
| 4243 | 4210 | |
|---|
| 4244 | 4211 | ahd_scb_devinfo(ahd, &devinfo, pending_scb); |
|---|
| 4245 | | - tinfo = ahd_fetch_transinfo(ahd, devinfo.channel, |
|---|
| 4246 | | - devinfo.our_scsiid, |
|---|
| 4247 | | - devinfo.target, &tstate); |
|---|
| 4212 | + ahd_fetch_transinfo(ahd, devinfo.channel, devinfo.our_scsiid, |
|---|
| 4213 | + devinfo.target, &tstate); |
|---|
| 4248 | 4214 | if ((tstate->auto_negotiate & devinfo.target_mask) == 0 |
|---|
| 4249 | 4215 | && (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) { |
|---|
| 4250 | 4216 | pending_scb->flags &= ~SCB_AUTO_NEGOTIATE; |
|---|
| .. | .. |
|---|
| 5138 | 5104 | break; |
|---|
| 5139 | 5105 | case MSG_MESSAGE_REJECT: |
|---|
| 5140 | 5106 | response = ahd_handle_msg_reject(ahd, devinfo); |
|---|
| 5141 | | - /* FALLTHROUGH */ |
|---|
| 5107 | + fallthrough; |
|---|
| 5142 | 5108 | case MSG_NOOP: |
|---|
| 5143 | 5109 | done = MSGLOOP_MSGCOMPLETE; |
|---|
| 5144 | 5110 | break; |
|---|
| .. | .. |
|---|
| 5488 | 5454 | ahd_name(ahd), ahd_inb(ahd, SCSISIGI)); |
|---|
| 5489 | 5455 | #endif |
|---|
| 5490 | 5456 | ahd->msg_flags |= MSG_FLAG_EXPECT_QASREJ_BUSFREE; |
|---|
| 5491 | | - /* FALLTHROUGH */ |
|---|
| 5457 | + fallthrough; |
|---|
| 5492 | 5458 | case MSG_TERM_IO_PROC: |
|---|
| 5493 | 5459 | default: |
|---|
| 5494 | 5460 | reject = TRUE; |
|---|
| .. | .. |
|---|
| 6073 | 6039 | { |
|---|
| 6074 | 6040 | struct ahd_softc *ahd; |
|---|
| 6075 | 6041 | |
|---|
| 6076 | | -#ifndef __FreeBSD__ |
|---|
| 6077 | | - ahd = kmalloc(sizeof(*ahd), GFP_ATOMIC); |
|---|
| 6042 | + ahd = kzalloc(sizeof(*ahd), GFP_ATOMIC); |
|---|
| 6078 | 6043 | if (!ahd) { |
|---|
| 6079 | 6044 | printk("aic7xxx: cannot malloc softc!\n"); |
|---|
| 6080 | 6045 | kfree(name); |
|---|
| 6081 | 6046 | return NULL; |
|---|
| 6082 | 6047 | } |
|---|
| 6083 | | -#else |
|---|
| 6084 | | - ahd = device_get_softc((device_t)platform_arg); |
|---|
| 6085 | | -#endif |
|---|
| 6086 | | - memset(ahd, 0, sizeof(*ahd)); |
|---|
| 6048 | + |
|---|
| 6087 | 6049 | ahd->seep_config = kmalloc(sizeof(*ahd->seep_config), GFP_ATOMIC); |
|---|
| 6088 | 6050 | if (ahd->seep_config == NULL) { |
|---|
| 6089 | | -#ifndef __FreeBSD__ |
|---|
| 6090 | 6051 | kfree(ahd); |
|---|
| 6091 | | -#endif |
|---|
| 6092 | 6052 | kfree(name); |
|---|
| 6093 | 6053 | return (NULL); |
|---|
| 6094 | 6054 | } |
|---|
| .. | .. |
|---|
| 6144 | 6104 | void |
|---|
| 6145 | 6105 | ahd_set_name(struct ahd_softc *ahd, char *name) |
|---|
| 6146 | 6106 | { |
|---|
| 6147 | | - if (ahd->name != NULL) |
|---|
| 6148 | | - kfree(ahd->name); |
|---|
| 6107 | + kfree(ahd->name); |
|---|
| 6149 | 6108 | ahd->name = name; |
|---|
| 6150 | 6109 | } |
|---|
| 6151 | 6110 | |
|---|
| .. | .. |
|---|
| 6158 | 6117 | default: |
|---|
| 6159 | 6118 | case 5: |
|---|
| 6160 | 6119 | ahd_shutdown(ahd); |
|---|
| 6161 | | - /* FALLTHROUGH */ |
|---|
| 6120 | + fallthrough; |
|---|
| 6162 | 6121 | case 4: |
|---|
| 6163 | 6122 | ahd_dmamap_unload(ahd, ahd->shared_data_dmat, |
|---|
| 6164 | 6123 | ahd->shared_data_map.dmamap); |
|---|
| 6165 | | - /* FALLTHROUGH */ |
|---|
| 6124 | + fallthrough; |
|---|
| 6166 | 6125 | case 3: |
|---|
| 6167 | 6126 | ahd_dmamem_free(ahd, ahd->shared_data_dmat, ahd->qoutfifo, |
|---|
| 6168 | 6127 | ahd->shared_data_map.dmamap); |
|---|
| 6169 | 6128 | ahd_dmamap_destroy(ahd, ahd->shared_data_dmat, |
|---|
| 6170 | 6129 | ahd->shared_data_map.dmamap); |
|---|
| 6171 | | - /* FALLTHROUGH */ |
|---|
| 6130 | + fallthrough; |
|---|
| 6172 | 6131 | case 2: |
|---|
| 6173 | 6132 | ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat); |
|---|
| 6174 | 6133 | case 1: |
|---|
| 6175 | | -#ifndef __linux__ |
|---|
| 6176 | | - ahd_dma_tag_destroy(ahd, ahd->buffer_dmat); |
|---|
| 6177 | | -#endif |
|---|
| 6178 | 6134 | break; |
|---|
| 6179 | 6135 | case 0: |
|---|
| 6180 | 6136 | break; |
|---|
| 6181 | 6137 | } |
|---|
| 6182 | 6138 | |
|---|
| 6183 | | -#ifndef __linux__ |
|---|
| 6184 | | - ahd_dma_tag_destroy(ahd, ahd->parent_dmat); |
|---|
| 6185 | | -#endif |
|---|
| 6186 | 6139 | ahd_platform_free(ahd); |
|---|
| 6187 | 6140 | ahd_fini_scbdata(ahd); |
|---|
| 6188 | 6141 | for (i = 0; i < AHD_NUM_TARGETS; i++) { |
|---|
| .. | .. |
|---|
| 6212 | 6165 | kfree(ahd->black_hole); |
|---|
| 6213 | 6166 | } |
|---|
| 6214 | 6167 | #endif |
|---|
| 6215 | | - if (ahd->name != NULL) |
|---|
| 6216 | | - kfree(ahd->name); |
|---|
| 6217 | | - if (ahd->seep_config != NULL) |
|---|
| 6218 | | - kfree(ahd->seep_config); |
|---|
| 6219 | | - if (ahd->saved_stack != NULL) |
|---|
| 6220 | | - kfree(ahd->saved_stack); |
|---|
| 6221 | | -#ifndef __FreeBSD__ |
|---|
| 6168 | + kfree(ahd->name); |
|---|
| 6169 | + kfree(ahd->seep_config); |
|---|
| 6170 | + kfree(ahd->saved_stack); |
|---|
| 6222 | 6171 | kfree(ahd); |
|---|
| 6223 | | -#endif |
|---|
| 6224 | 6172 | return; |
|---|
| 6225 | 6173 | } |
|---|
| 6226 | 6174 | |
|---|
| .. | .. |
|---|
| 6564 | 6512 | kfree(sns_map); |
|---|
| 6565 | 6513 | } |
|---|
| 6566 | 6514 | ahd_dma_tag_destroy(ahd, scb_data->sense_dmat); |
|---|
| 6567 | | - /* FALLTHROUGH */ |
|---|
| 6568 | 6515 | } |
|---|
| 6516 | + fallthrough; |
|---|
| 6569 | 6517 | case 6: |
|---|
| 6570 | 6518 | { |
|---|
| 6571 | 6519 | struct map_node *sg_map; |
|---|
| .. | .. |
|---|
| 6579 | 6527 | kfree(sg_map); |
|---|
| 6580 | 6528 | } |
|---|
| 6581 | 6529 | ahd_dma_tag_destroy(ahd, scb_data->sg_dmat); |
|---|
| 6582 | | - /* FALLTHROUGH */ |
|---|
| 6583 | 6530 | } |
|---|
| 6531 | + fallthrough; |
|---|
| 6584 | 6532 | case 5: |
|---|
| 6585 | 6533 | { |
|---|
| 6586 | 6534 | struct map_node *hscb_map; |
|---|
| .. | .. |
|---|
| 6934 | 6882 | for (i = 0; i < newcount; i++) { |
|---|
| 6935 | 6883 | struct scb_platform_data *pdata; |
|---|
| 6936 | 6884 | u_int col_tag; |
|---|
| 6937 | | -#ifndef __linux__ |
|---|
| 6938 | | - int error; |
|---|
| 6939 | | -#endif |
|---|
| 6940 | 6885 | |
|---|
| 6941 | 6886 | next_scb = kmalloc(sizeof(*next_scb), GFP_ATOMIC); |
|---|
| 6942 | 6887 | if (next_scb == NULL) |
|---|
| .. | .. |
|---|
| 6970 | 6915 | next_scb->sg_list_busaddr += sizeof(struct ahd_dma_seg); |
|---|
| 6971 | 6916 | next_scb->ahd_softc = ahd; |
|---|
| 6972 | 6917 | next_scb->flags = SCB_FLAG_NONE; |
|---|
| 6973 | | -#ifndef __linux__ |
|---|
| 6974 | | - error = ahd_dmamap_create(ahd, ahd->buffer_dmat, /*flags*/0, |
|---|
| 6975 | | - &next_scb->dmamap); |
|---|
| 6976 | | - if (error != 0) { |
|---|
| 6977 | | - kfree(next_scb); |
|---|
| 6978 | | - kfree(pdata); |
|---|
| 6979 | | - break; |
|---|
| 6980 | | - } |
|---|
| 6981 | | -#endif |
|---|
| 6982 | 6918 | next_scb->hscb->tag = ahd_htole16(scb_data->numscbs); |
|---|
| 6983 | 6919 | col_tag = scb_data->numscbs ^ 0x100; |
|---|
| 6984 | 6920 | next_scb->col_scb = ahd_find_scb_by_tag(ahd, col_tag); |
|---|
| .. | .. |
|---|
| 7090 | 7026 | */ |
|---|
| 7091 | 7027 | if ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) == 0) |
|---|
| 7092 | 7028 | ahd->features &= ~AHD_TARGETMODE; |
|---|
| 7093 | | - |
|---|
| 7094 | | -#ifndef __linux__ |
|---|
| 7095 | | - /* DMA tag for mapping buffers into device visible space. */ |
|---|
| 7096 | | - if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1, |
|---|
| 7097 | | - /*boundary*/BUS_SPACE_MAXADDR_32BIT + 1, |
|---|
| 7098 | | - /*lowaddr*/ahd->flags & AHD_39BIT_ADDRESSING |
|---|
| 7099 | | - ? (dma_addr_t)0x7FFFFFFFFFULL |
|---|
| 7100 | | - : BUS_SPACE_MAXADDR_32BIT, |
|---|
| 7101 | | - /*highaddr*/BUS_SPACE_MAXADDR, |
|---|
| 7102 | | - /*filter*/NULL, /*filterarg*/NULL, |
|---|
| 7103 | | - /*maxsize*/(AHD_NSEG - 1) * PAGE_SIZE, |
|---|
| 7104 | | - /*nsegments*/AHD_NSEG, |
|---|
| 7105 | | - /*maxsegsz*/AHD_MAXTRANSFER_SIZE, |
|---|
| 7106 | | - /*flags*/BUS_DMA_ALLOCNOW, |
|---|
| 7107 | | - &ahd->buffer_dmat) != 0) { |
|---|
| 7108 | | - return (ENOMEM); |
|---|
| 7109 | | - } |
|---|
| 7110 | | -#endif |
|---|
| 7111 | 7029 | |
|---|
| 7112 | 7030 | ahd->init_level++; |
|---|
| 7113 | 7031 | |
|---|
| .. | .. |
|---|
| 7253 | 7171 | case FLX_CSTAT_OVER: |
|---|
| 7254 | 7172 | case FLX_CSTAT_UNDER: |
|---|
| 7255 | 7173 | warn_user++; |
|---|
| 7174 | + fallthrough; |
|---|
| 7256 | 7175 | case FLX_CSTAT_INVALID: |
|---|
| 7257 | 7176 | case FLX_CSTAT_OKAY: |
|---|
| 7258 | 7177 | if (warn_user == 0 && bootverbose == 0) |
|---|
| .. | .. |
|---|
| 8256 | 8175 | if ((scb->flags & SCB_ACTIVE) == 0) |
|---|
| 8257 | 8176 | printk("Inactive SCB in qinfifo\n"); |
|---|
| 8258 | 8177 | ahd_done_with_status(ahd, scb, status); |
|---|
| 8259 | | - /* FALLTHROUGH */ |
|---|
| 8178 | + fallthrough; |
|---|
| 8260 | 8179 | case SEARCH_REMOVE: |
|---|
| 8261 | 8180 | break; |
|---|
| 8262 | 8181 | case SEARCH_PRINT: |
|---|
| 8263 | 8182 | printk(" 0x%x", ahd->qinfifo[qinpos]); |
|---|
| 8264 | | - /* FALLTHROUGH */ |
|---|
| 8183 | + fallthrough; |
|---|
| 8265 | 8184 | case SEARCH_COUNT: |
|---|
| 8266 | 8185 | ahd_qinfifo_requeue(ahd, prev_scb, scb); |
|---|
| 8267 | 8186 | prev_scb = scb; |
|---|
| .. | .. |
|---|
| 8352 | 8271 | if ((mk_msg_scb->flags & SCB_ACTIVE) == 0) |
|---|
| 8353 | 8272 | printk("Inactive SCB pending MK_MSG\n"); |
|---|
| 8354 | 8273 | ahd_done_with_status(ahd, mk_msg_scb, status); |
|---|
| 8355 | | - /* FALLTHROUGH */ |
|---|
| 8274 | + fallthrough; |
|---|
| 8356 | 8275 | case SEARCH_REMOVE: |
|---|
| 8357 | 8276 | { |
|---|
| 8358 | 8277 | u_int tail_offset; |
|---|
| .. | .. |
|---|
| 8376 | 8295 | } |
|---|
| 8377 | 8296 | case SEARCH_PRINT: |
|---|
| 8378 | 8297 | printk(" 0x%x", SCB_GET_TAG(scb)); |
|---|
| 8379 | | - /* FALLTHROUGH */ |
|---|
| 8298 | + fallthrough; |
|---|
| 8380 | 8299 | case SEARCH_COUNT: |
|---|
| 8381 | 8300 | break; |
|---|
| 8382 | 8301 | } |
|---|
| .. | .. |
|---|
| 8457 | 8376 | if ((scb->flags & SCB_ACTIVE) == 0) |
|---|
| 8458 | 8377 | printk("Inactive SCB in Waiting List\n"); |
|---|
| 8459 | 8378 | ahd_done_with_status(ahd, scb, status); |
|---|
| 8460 | | - /* FALLTHROUGH */ |
|---|
| 8379 | + fallthrough; |
|---|
| 8461 | 8380 | case SEARCH_REMOVE: |
|---|
| 8462 | 8381 | ahd_rem_wscb(ahd, scbid, prev, next, tid); |
|---|
| 8463 | 8382 | *list_tail = prev; |
|---|
| .. | .. |
|---|
| 8466 | 8385 | break; |
|---|
| 8467 | 8386 | case SEARCH_PRINT: |
|---|
| 8468 | 8387 | printk("0x%x ", scbid); |
|---|
| 8388 | + fallthrough; |
|---|
| 8469 | 8389 | case SEARCH_COUNT: |
|---|
| 8470 | 8390 | prev = scbid; |
|---|
| 8471 | 8391 | break; |
|---|
| .. | .. |
|---|
| 9103 | 9023 | case SCSI_STATUS_OK: |
|---|
| 9104 | 9024 | printk("%s: Interrupted for status of 0???\n", |
|---|
| 9105 | 9025 | ahd_name(ahd)); |
|---|
| 9106 | | - /* FALLTHROUGH */ |
|---|
| 9026 | + fallthrough; |
|---|
| 9107 | 9027 | default: |
|---|
| 9108 | 9028 | ahd_done(ahd, scb); |
|---|
| 9109 | 9029 | break; |
|---|
| .. | .. |
|---|
| 9482 | 9402 | if (cs_count != 0) { |
|---|
| 9483 | 9403 | |
|---|
| 9484 | 9404 | cs_count *= sizeof(struct cs); |
|---|
| 9485 | | - ahd->critical_sections = kmalloc(cs_count, GFP_ATOMIC); |
|---|
| 9405 | + ahd->critical_sections = kmemdup(cs_table, cs_count, GFP_ATOMIC); |
|---|
| 9486 | 9406 | if (ahd->critical_sections == NULL) |
|---|
| 9487 | 9407 | panic("ahd_loadseq: Could not malloc"); |
|---|
| 9488 | | - memcpy(ahd->critical_sections, cs_table, cs_count); |
|---|
| 9489 | 9408 | } |
|---|
| 9490 | 9409 | ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE); |
|---|
| 9491 | 9410 | |
|---|
| .. | .. |
|---|
| 9591 | 9510 | { |
|---|
| 9592 | 9511 | fmt3_ins = &instr.format3; |
|---|
| 9593 | 9512 | fmt3_ins->address = ahd_resolve_seqaddr(ahd, fmt3_ins->address); |
|---|
| 9594 | | - /* FALLTHROUGH */ |
|---|
| 9595 | 9513 | } |
|---|
| 9514 | + fallthrough; |
|---|
| 9596 | 9515 | case AIC_OP_OR: |
|---|
| 9597 | 9516 | case AIC_OP_AND: |
|---|
| 9598 | 9517 | case AIC_OP_XOR: |
|---|
| .. | .. |
|---|
| 9603 | 9522 | fmt1_ins->immediate = dconsts[fmt1_ins->immediate]; |
|---|
| 9604 | 9523 | } |
|---|
| 9605 | 9524 | fmt1_ins->parity = 0; |
|---|
| 9606 | | - /* FALLTHROUGH */ |
|---|
| 9525 | + fallthrough; |
|---|
| 9607 | 9526 | case AIC_OP_ROL: |
|---|
| 9608 | 9527 | { |
|---|
| 9609 | 9528 | int i, count; |
|---|