patch-2.4.20 linux-2.4.20/drivers/scsi/aacraid/commctrl.c
Next file: linux-2.4.20/drivers/scsi/aacraid/comminit.c
Previous file: linux-2.4.20/drivers/scsi/aacraid/aacraid.h
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Thu Nov 28 15:53:14 2002
- Orig file:
linux-2.4.19/drivers/scsi/aacraid/commctrl.c
- Orig date:
Fri Dec 21 09:41:55 2001
diff -urN linux-2.4.19/drivers/scsi/aacraid/commctrl.c linux-2.4.20/drivers/scsi/aacraid/commctrl.c
@@ -364,8 +364,8 @@
struct revision response;
response.compat = 1;
- response.version = 0x03000400;
- response.build = 0x5125;
+ response.version = dev->adapter_info.kernelrev;
+ response.build = dev->adapter_info.kernelbuild;
if (copy_to_user(arg, &response, sizeof(response)))
return -EFAULT;
@@ -373,6 +373,25 @@
}
+struct aac_pci_info {
+ u32 bus;
+ u32 slot;
+};
+
+
+int aac_get_pci_info(struct aac_dev* dev, void* arg)
+{
+ struct aac_pci_info pci_info;
+
+ pci_info.bus = dev->pdev->bus->number;
+ pci_info.slot = PCI_SLOT(dev->pdev->devfn);
+
+ if(copy_to_user( arg, (void*)&pci_info, sizeof(struct aac_pci_info)))
+ return -EFAULT;
+ return 0;
+ }
+
+
int aac_do_ioctl(struct aac_dev * dev, int cmd, void *arg)
{
int status;
@@ -401,6 +420,9 @@
case FSACTL_CLOSE_GET_ADAPTER_FIB:
status = close_getadapter_fib(dev, arg);
break;
+ case FSACTL_GET_PCI_INFO:
+ status = aac_get_pci_info(dev,arg);
+ break;
default:
status = -ENOTTY;
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)