megaraid_mbox.c (36d99df2fb474222ab47fbe8ae7385661033223b) megaraid_mbox.c (69cd39e94669e2994277a29249b6ef93b088ddbb)
1/*
2 *
3 * Linux MegaRAID device driver
4 *
5 * Copyright (c) 2003-2004 LSI Logic Corporation.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 3154 unchanged lines hidden (view full) ---

3163 */
3164static int
3165megaraid_mbox_support_random_del(adapter_t *adapter)
3166{
3167 mbox_t *mbox;
3168 uint8_t raw_mbox[sizeof(mbox_t)];
3169 int rval;
3170
1/*
2 *
3 * Linux MegaRAID device driver
4 *
5 * Copyright (c) 2003-2004 LSI Logic Corporation.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 3154 unchanged lines hidden (view full) ---

3163 */
3164static int
3165megaraid_mbox_support_random_del(adapter_t *adapter)
3166{
3167 mbox_t *mbox;
3168 uint8_t raw_mbox[sizeof(mbox_t)];
3169 int rval;
3170
3171 /*
3172 * Newer firmware on Dell CERC expect a different
3173 * random deletion handling, so disable it.
3174 */
3175 if (adapter->pdev->vendor == PCI_VENDOR_ID_AMI &&
3176 adapter->pdev->device == PCI_DEVICE_ID_AMI_MEGARAID3 &&
3177 adapter->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
3178 adapter->pdev->subsystem_device == PCI_SUBSYS_ID_CERC_ATA100_4CH &&
3179 (adapter->fw_version[0] > '6' ||
3180 (adapter->fw_version[0] == '6' &&
3181 adapter->fw_version[2] > '6') ||
3182 (adapter->fw_version[0] == '6'
3183 && adapter->fw_version[2] == '6'
3184 && adapter->fw_version[3] > '1'))) {
3185 con_log(CL_DLEVEL1, ("megaraid: disable random deletion\n"));
3186 return 0;
3187 }
3171
3172 mbox = (mbox_t *)raw_mbox;
3173
3174 memset((caddr_t)raw_mbox, 0, sizeof(mbox_t));
3175
3176 raw_mbox[0] = FC_DEL_LOGDRV;
3177 raw_mbox[2] = OP_SUP_DEL_LOGDRV;
3178

--- 977 unchanged lines hidden ---
3188
3189 mbox = (mbox_t *)raw_mbox;
3190
3191 memset((caddr_t)raw_mbox, 0, sizeof(mbox_t));
3192
3193 raw_mbox[0] = FC_DEL_LOGDRV;
3194 raw_mbox[2] = OP_SUP_DEL_LOGDRV;
3195

--- 977 unchanged lines hidden ---