mwavedd.c (cb5629b10d64a8006622ce3a52bc887d91057d69) mwavedd.c (dc80df567dd04738ee8b3922feacf099ae81645e)
1/*
2*
3* mwavedd.c -- mwave device driver
4*
5*
6* Written By: Mike Sullivan IBM Corporation
7*
8* Copyright (C) 1999 IBM Corporation

--- 267 unchanged lines hidden (view full) ---

276 rWriteData.usDspAddress);
277 unlock_kernel();
278 }
279 break;
280
281 case IOCTL_MW_REGISTER_IPC: {
282 unsigned int ipcnum = (unsigned int) ioarg;
283
1/*
2*
3* mwavedd.c -- mwave device driver
4*
5*
6* Written By: Mike Sullivan IBM Corporation
7*
8* Copyright (C) 1999 IBM Corporation

--- 267 unchanged lines hidden (view full) ---

276 rWriteData.usDspAddress);
277 unlock_kernel();
278 }
279 break;
280
281 case IOCTL_MW_REGISTER_IPC: {
282 unsigned int ipcnum = (unsigned int) ioarg;
283
284 PRINTK_3(TRACE_MWAVE,
285 "mwavedd::mwave_ioctl IOCTL_MW_REGISTER_IPC"
286 " ipcnum %x entry usIntCount %x\n",
287 ipcnum,
288 pDrvData->IPCs[ipcnum].usIntCount);
289
290 if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
291 PRINTK_ERROR(KERN_ERR_MWAVE
292 "mwavedd::mwave_ioctl:"
293 " IOCTL_MW_REGISTER_IPC:"
294 " Error: Invalid ipcnum %x\n",
295 ipcnum);
296 return -EINVAL;
297 }
284 if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
285 PRINTK_ERROR(KERN_ERR_MWAVE
286 "mwavedd::mwave_ioctl:"
287 " IOCTL_MW_REGISTER_IPC:"
288 " Error: Invalid ipcnum %x\n",
289 ipcnum);
290 return -EINVAL;
291 }
292 PRINTK_3(TRACE_MWAVE,
293 "mwavedd::mwave_ioctl IOCTL_MW_REGISTER_IPC"
294 " ipcnum %x entry usIntCount %x\n",
295 ipcnum,
296 pDrvData->IPCs[ipcnum].usIntCount);
297
298 lock_kernel();
299 pDrvData->IPCs[ipcnum].bIsHere = FALSE;
300 pDrvData->IPCs[ipcnum].bIsEnabled = TRUE;
301 unlock_kernel();
302
303 PRINTK_2(TRACE_MWAVE,
304 "mwavedd::mwave_ioctl IOCTL_MW_REGISTER_IPC"
305 " ipcnum %x exit\n",
306 ipcnum);
307 }
308 break;
309
310 case IOCTL_MW_GET_IPC: {
311 unsigned int ipcnum = (unsigned int) ioarg;
312
298 lock_kernel();
299 pDrvData->IPCs[ipcnum].bIsHere = FALSE;
300 pDrvData->IPCs[ipcnum].bIsEnabled = TRUE;
301 unlock_kernel();
302
303 PRINTK_2(TRACE_MWAVE,
304 "mwavedd::mwave_ioctl IOCTL_MW_REGISTER_IPC"
305 " ipcnum %x exit\n",
306 ipcnum);
307 }
308 break;
309
310 case IOCTL_MW_GET_IPC: {
311 unsigned int ipcnum = (unsigned int) ioarg;
312
313 PRINTK_3(TRACE_MWAVE,
314 "mwavedd::mwave_ioctl IOCTL_MW_GET_IPC"
315 " ipcnum %x, usIntCount %x\n",
316 ipcnum,
317 pDrvData->IPCs[ipcnum].usIntCount);
318 if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
319 PRINTK_ERROR(KERN_ERR_MWAVE
320 "mwavedd::mwave_ioctl:"
321 " IOCTL_MW_GET_IPC: Error:"
322 " Invalid ipcnum %x\n", ipcnum);
323 return -EINVAL;
324 }
313 if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
314 PRINTK_ERROR(KERN_ERR_MWAVE
315 "mwavedd::mwave_ioctl:"
316 " IOCTL_MW_GET_IPC: Error:"
317 " Invalid ipcnum %x\n", ipcnum);
318 return -EINVAL;
319 }
320 PRINTK_3(TRACE_MWAVE,
321 "mwavedd::mwave_ioctl IOCTL_MW_GET_IPC"
322 " ipcnum %x, usIntCount %x\n",
323 ipcnum,
324 pDrvData->IPCs[ipcnum].usIntCount);
325
326 lock_kernel();
327 if (pDrvData->IPCs[ipcnum].bIsEnabled == TRUE) {
328 DECLARE_WAITQUEUE(wait, current);
329
330 PRINTK_2(TRACE_MWAVE,
331 "mwavedd::mwave_ioctl, thread for"
332 " ipc %x going to sleep\n",

--- 364 unchanged lines hidden ---
325
326 lock_kernel();
327 if (pDrvData->IPCs[ipcnum].bIsEnabled == TRUE) {
328 DECLARE_WAITQUEUE(wait, current);
329
330 PRINTK_2(TRACE_MWAVE,
331 "mwavedd::mwave_ioctl, thread for"
332 " ipc %x going to sleep\n",

--- 364 unchanged lines hidden ---