sunvdc.c (9a64e8e0ace51b309fdcff4b4754b3649250382a) | sunvdc.c (8d85fce77edfc22f1d6dbf78e3af723b4b556f3d) |
---|---|
1/* sunvdc.c: Sun LDOM Virtual Disk Client. 2 * 3 * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> 4 */ 5 6#include <linux/module.h> 7#include <linux/kernel.h> 8#include <linux/types.h> --- 11 unchanged lines hidden (view full) --- 20#include <asm/vio.h> 21#include <asm/ldc.h> 22 23#define DRV_MODULE_NAME "sunvdc" 24#define PFX DRV_MODULE_NAME ": " 25#define DRV_MODULE_VERSION "1.0" 26#define DRV_MODULE_RELDATE "June 25, 2007" 27 | 1/* sunvdc.c: Sun LDOM Virtual Disk Client. 2 * 3 * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> 4 */ 5 6#include <linux/module.h> 7#include <linux/kernel.h> 8#include <linux/types.h> --- 11 unchanged lines hidden (view full) --- 20#include <asm/vio.h> 21#include <asm/ldc.h> 22 23#define DRV_MODULE_NAME "sunvdc" 24#define PFX DRV_MODULE_NAME ": " 25#define DRV_MODULE_VERSION "1.0" 26#define DRV_MODULE_RELDATE "June 25, 2007" 27 |
28static char version[] __devinitdata = | 28static char version[] = |
29 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 30MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); 31MODULE_DESCRIPTION("Sun LDOM virtual disk client driver"); 32MODULE_LICENSE("GPL"); 33MODULE_VERSION(DRV_MODULE_VERSION); 34 35#define VDC_TX_RING_SIZE 256 36 --- 550 unchanged lines hidden (view full) --- 587 if (map_perm & LDC_MAP_W) 588 memcpy(buf, req_buf, len); 589 590 kfree(req_buf); 591 592 return err; 593} 594 | 29 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 30MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); 31MODULE_DESCRIPTION("Sun LDOM virtual disk client driver"); 32MODULE_LICENSE("GPL"); 33MODULE_VERSION(DRV_MODULE_VERSION); 34 35#define VDC_TX_RING_SIZE 256 36 --- 550 unchanged lines hidden (view full) --- 587 if (map_perm & LDC_MAP_W) 588 memcpy(buf, req_buf, len); 589 590 kfree(req_buf); 591 592 return err; 593} 594 |
595static int __devinit vdc_alloc_tx_ring(struct vdc_port *port) | 595static int vdc_alloc_tx_ring(struct vdc_port *port) |
596{ 597 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; 598 unsigned long len, entry_size; 599 int ncookies; 600 void *dring; 601 602 entry_size = sizeof(struct vio_disk_desc) + 603 (sizeof(struct ldc_trans_cookie) * port->ring_cookies); --- 116 unchanged lines hidden (view full) --- 720}; 721 722static struct vio_driver_ops vdc_vio_ops = { 723 .send_attr = vdc_send_attr, 724 .handle_attr = vdc_handle_attr, 725 .handshake_complete = vdc_handshake_complete, 726}; 727 | 596{ 597 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; 598 unsigned long len, entry_size; 599 int ncookies; 600 void *dring; 601 602 entry_size = sizeof(struct vio_disk_desc) + 603 (sizeof(struct ldc_trans_cookie) * port->ring_cookies); --- 116 unchanged lines hidden (view full) --- 720}; 721 722static struct vio_driver_ops vdc_vio_ops = { 723 .send_attr = vdc_send_attr, 724 .handle_attr = vdc_handle_attr, 725 .handshake_complete = vdc_handshake_complete, 726}; 727 |
728static void __devinit print_version(void) | 728static void print_version(void) |
729{ 730 static int version_printed; 731 732 if (version_printed++ == 0) 733 printk(KERN_INFO "%s", version); 734} 735 | 729{ 730 static int version_printed; 731 732 if (version_printed++ == 0) 733 printk(KERN_INFO "%s", version); 734} 735 |
736static int __devinit vdc_port_probe(struct vio_dev *vdev, 737 const struct vio_device_id *id) | 736static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id) |
738{ 739 struct mdesc_handle *hp; 740 struct vdc_port *port; 741 int err; 742 743 print_version(); 744 745 hp = mdesc_grab(); --- 131 unchanged lines hidden --- | 737{ 738 struct mdesc_handle *hp; 739 struct vdc_port *port; 740 int err; 741 742 print_version(); 743 744 hp = mdesc_grab(); --- 131 unchanged lines hidden --- |