Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96142
b: refs/heads/master
c: 8b2cc91
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed May 8, 2008
1 parent 5e0e254 commit 5959cef
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 56 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5be7a4792a31df6f2cd44bfba8da467ea20a0642
refs/heads/master: 8b2cc917a02936c3ea7d8da46801c7b7b6233093
78 changes: 36 additions & 42 deletions trunk/drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -1967,45 +1967,6 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
return rcode;
}


/*
* This routine returns information about the system. This does not effect
* any logic and if the info is wrong - it doesn't matter.
*/

/* Get all the info we can not get from kernel services */
static int adpt_system_info(void __user *buffer)
{
sysInfo_S si;

memset(&si, 0, sizeof(si));

si.osType = OS_LINUX;
si.osMajorVersion = 0;
si.osMinorVersion = 0;
si.osRevision = 0;
si.busType = SI_PCI_BUS;
si.processorFamily = DPTI_sig.dsProcessorFamily;

#if defined __i386__
adpt_i386_info(&si);
#elif defined (__ia64__)
adpt_ia64_info(&si);
#elif defined(__sparc__)
adpt_sparc_info(&si);
#elif defined (__alpha__)
adpt_alpha_info(&si);
#else
si.processorType = 0xff ;
#endif
if(copy_to_user(buffer, &si, sizeof(si))){
printk(KERN_WARNING"dpti: Could not copy buffer TO user\n");
return -EFAULT;
}

return 0;
}

#if defined __ia64__
static void adpt_ia64_info(sysInfo_S* si)
{
Expand All @@ -2016,7 +1977,6 @@ static void adpt_ia64_info(sysInfo_S* si)
}
#endif


#if defined __sparc__
static void adpt_sparc_info(sysInfo_S* si)
{
Expand All @@ -2026,7 +1986,6 @@ static void adpt_sparc_info(sysInfo_S* si)
si->processorType = PROC_ULTRASPARC;
}
#endif

#if defined __alpha__
static void adpt_alpha_info(sysInfo_S* si)
{
Expand All @@ -2038,7 +1997,6 @@ static void adpt_alpha_info(sysInfo_S* si)
#endif

#if defined __i386__

static void adpt_i386_info(sysInfo_S* si)
{
// This is all the info we need for now
Expand All @@ -2059,9 +2017,45 @@ static void adpt_i386_info(sysInfo_S* si)
break;
}
}
#endif

/*
* This routine returns information about the system. This does not effect
* any logic and if the info is wrong - it doesn't matter.
*/

/* Get all the info we can not get from kernel services */
static int adpt_system_info(void __user *buffer)
{
sysInfo_S si;

memset(&si, 0, sizeof(si));

si.osType = OS_LINUX;
si.osMajorVersion = 0;
si.osMinorVersion = 0;
si.osRevision = 0;
si.busType = SI_PCI_BUS;
si.processorFamily = DPTI_sig.dsProcessorFamily;

#if defined __i386__
adpt_i386_info(&si);
#elif defined (__ia64__)
adpt_ia64_info(&si);
#elif defined(__sparc__)
adpt_sparc_info(&si);
#elif defined (__alpha__)
adpt_alpha_info(&si);
#else
si.processorType = 0xff ;
#endif
if (copy_to_user(buffer, &si, sizeof(si))){
printk(KERN_WARNING"dpti: Could not copy buffer TO user\n");
return -EFAULT;
}

return 0;
}

static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd,
ulong arg)
Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/scsi/dpti.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,19 +316,6 @@ static int adpt_close(struct inode *inode, struct file *file);
static void adpt_delay(int millisec);
#endif

#if defined __ia64__
static void adpt_ia64_info(sysInfo_S* si);
#endif
#if defined __sparc__
static void adpt_sparc_info(sysInfo_S* si);
#endif
#if defined __alpha__
static void adpt_sparc_info(sysInfo_S* si);
#endif
#if defined __i386__
static void adpt_i386_info(sysInfo_S* si);
#endif

#define PRINT_BUFFER_SIZE 512

#define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags
Expand Down

0 comments on commit 5959cef

Please sign in to comment.