[lkml]   [2001]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ACP Modem (Mwave)
The patch has been updated...  The updates primarily consist of Alan's
suggested changes below... (thank you) It applies against the 2.4.6

It can be gotten here:
Or directly:

Comments, questions, suggestions are appreciated...


Paul B Schroeder <>
Software Engineer, Linux Technology Center
IBM Corporation, Austin, TX

Alan Cox <> on 05/16/2001 07:11:34 PM

To: Paul Schroeder/Austin/IBM@IBMUS
cc:, Mike Sullivan/Austin/IBM@IBMUS
Subject: Re: [PATCH] ACP Modem (Mwave)

> Please throw any comments, questions, suggestions, hard objects this

First obvious comments

+ while (uCount-- != 0) {
+ unsigned short val_lo, val_hi;
+ cli();
+ val_lo = InWordDsp(DSP_MsaDataISLow);
+ val_hi = InWordDsp(DSP_MsaDataDSISHigh);
+ put_user(val_lo, pusBuffer++);
+ put_user(val_hi, pusBuffer++);
+ sti();

1. Please use spinlocks not cli/sti as they will go away probably in 2.5

2. You can't touch user space holding interrupts off as it can't handle
page faults

+void PaceMsaAccess(unsigned short usDspBaseIO)
+ schedule();
+ udelay(100);
+ schedule();

If you are trying to be friendly then add


just to be more efficient

+BOOLEAN dsp3780I_GetIPCSource(unsigned short usDspBaseIO,
+ unsigned short *pusIPCSourc


would be more in keeping. Not a bug by any means

The ioctl locking seems wrong. It doesnt look like the DSP accesses are
locked against one another and you can issue multiple ioctls in parallel in
different threads

If mwave_read/write do nothing then they should really be returning an
code. 0 is EOF, count on write is success.

+BOOLEAN smapi_init()

you want (void) or you get compiler warnings on some compiler revisions

+ PRINTK_1(TRACE_SMAPI, "smapi::smapi_init entry\n");
+ usSmapiID = CMOS_READ(0x7C);
+ usSmapiID |= (CMOS_READ(0x7D) << 8);

CMOS reads/writes must be done holding the lock against other cmos users

+int Initialize(THINKPAD_BD_DATA * pBDData)

Please dont have globals with names so generic

Hope those are useful


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.046 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site