Deleted Added
full compact
45c45
< __FBSDID("$FreeBSD: head/sys/dev/mrsas/mrsas.c 272735 2014-10-08 08:48:18Z kadesai $");
---
> __FBSDID("$FreeBSD: head/sys/dev/mrsas/mrsas.c 272737 2014-10-08 09:19:35Z kadesai $");
67a68
> static struct mrsas_mgmt_info mrsas_mgmt_info;
140c141
< extern int mrsas_passthru(struct mrsas_softc *sc, void *arg);
---
> extern int mrsas_passthru(struct mrsas_softc *sc, void *arg, u_long ioctlCmd);
660c661
< sc->last_seq_num = seq_num;
---
> sc->last_seq_num = seq_num;
777a779,780
> if (device_get_unit(dev) == 0)
> make_dev_alias(sc->mrsas_cdev, "megaraid_sas_ioctl_node");
818a822,832
> /*
> * Add this controller to mrsas_mgmt_info structure so that it
> * can be exported to management applications
> */
> if (device_get_unit(dev) == 0)
> memset(&mrsas_mgmt_info, 0, sizeof(mrsas_mgmt_info));
>
> mrsas_mgmt_info.count++;
> mrsas_mgmt_info.sc_ptr[mrsas_mgmt_info.max_index] = sc;
> mrsas_mgmt_info.max_index++;
>
860a875,887
>
> /*
> * Take the instance off the instance array. Note that we will not
> * decrement the max_index. We let this array be sparse array
> */
> for (i = 0; i < mrsas_mgmt_info.max_index; i++) {
> if (mrsas_mgmt_info.sc_ptr[i] == sc) {
> mrsas_mgmt_info.count--;
> mrsas_mgmt_info.sc_ptr[i] = NULL;
> break;
> }
> }
>
1104,1105c1131,1143
< sc = (struct mrsas_softc *)(dev->si_drv1);
<
---
> struct mrsas_iocpacket *user_ioc = (struct mrsas_iocpacket *)arg;
>
> /* get the Host number & the softc from data sent by the Application */
> sc = mrsas_mgmt_info.sc_ptr[user_ioc->host_no];
>
> if ((mrsas_mgmt_info.max_index == user_ioc->host_no) || (sc == NULL)) {
> printf ("Please check the controller number\n");
> if (sc == NULL)
> printf ("There is NO such Host no. %d\n", user_ioc->host_no);
>
> return ENOENT;
> }
>
1134,1135c1172,1176
< case MRSAS_IOC_FIRMWARE_PASS_THROUGH:
< ret = mrsas_passthru(sc, (void *)arg);
---
> case MRSAS_IOC_FIRMWARE_PASS_THROUGH64:
> #ifdef COMPAT_FREEBSD32
> case MRSAS_IOC_FIRMWARE_PASS_THROUGH32:
> #endif
> ret = mrsas_passthru(sc, (void *)arg, cmd);
1139a1181,1182
> default:
> mrsas_dprint(sc, MRSAS_TRACE, "IOCTL command 0x%lx is not handled\n", cmd);