• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/usb/misc/

Lines Matching refs:ccp

1168         pauerchar_t ccp = ((pauerchar_t)((char *)(scp)-(unsigned long)(&((pauerchar_t)0)->scontext)));
1170 ccp->removed = 1;
1171 wake_up (&ccp->readwait);
1179 pauerchar_t ccp;
1183 ccp = ((pauerchar_t)((char *)(scp)-(unsigned long)(&((pauerchar_t)0)->scontext)));
1186 spin_lock_irqsave (&ccp->bufctl.lock, flags);
1187 if (!list_empty (&ccp->bufctl.free_buff_list)) {
1189 struct list_head *tmp = ccp->bufctl.free_buff_list.next;
1193 spin_unlock_irqrestore (&ccp->bufctl.lock, flags);
1208 spin_lock_irqsave (&ccp->bufctl.lock, flags);
1209 list_add_tail (&newbp->buff_list, &ccp->bufctl.rec_buff_list);
1210 spin_unlock_irqrestore (&ccp->bufctl.lock, flags);
1214 wake_up (&ccp->readwait);
1239 static void auerchar_delete( pauerchar_t ccp)
1242 if (ccp == NULL)
1246 ccp->removed = 1;
1247 wake_up (&ccp->readwait);
1250 if (ccp->readbuf) {
1251 auerbuf_releasebuf (ccp->readbuf);
1252 ccp->readbuf = NULL;
1256 auerbuf_free_buffers (&ccp->bufctl);
1259 kfree( ccp);
1356 pauerchar_t ccp = NULL;
1379 ccp = kzalloc(sizeof(auerchar_t), GFP_KERNEL);
1380 if (ccp == NULL) {
1387 init_MUTEX( &ccp->mutex);
1388 init_MUTEX( &ccp->readmutex);
1389 auerbuf_init (&ccp->bufctl);
1390 ccp->scontext.id = AUH_UNASSIGNED;
1391 ccp->scontext.dispatch = auerchar_ctrlread_dispatch;
1392 ccp->scontext.disconnect = auerchar_disconnect;
1393 init_waitqueue_head (&ccp->readwait);
1395 ret = auerbuf_setup (&ccp->bufctl, AU_RBUFFERS, cp->maxControlLength+AUH_SIZE);
1401 ccp->auerdev = cp;
1407 file->private_data = ccp;
1412 auerchar_delete (ccp);
1420 pauerchar_t ccp = (pauerchar_t) file->private_data;
1430 if (down_interruptible (&ccp->mutex)) {
1433 cp = ccp->auerdev;
1435 up (&ccp->mutex);
1439 up(&ccp->mutex);
1446 up(&ccp->mutex);
1455 u = ccp->auerdev
1456 && (ccp->scontext.id != AUH_UNASSIGNED)
1464 u = (ccp->scontext.id != AUH_UNASSIGNED);
1471 if (ccp->scontext.id == AUH_UNASSIGNED) {
1476 if (ccp->readbuf) {
1477 int restlen = ccp->readbuf->len - ccp->readoffset;
1482 if (!list_empty (&ccp->bufctl.rec_buff_list)) {
1500 auerswald_removeservice (cp, &ccp->scontext);
1511 ccp->scontext.id = u;
1514 ret = auerswald_addservice (cp, &ccp->scontext);
1517 ccp->scontext.id = AUH_UNASSIGNED;
1549 up(&ccp->mutex);
1557 pauerchar_t ccp = (pauerchar_t) file->private_data;
1564 if (!ccp)
1572 if (down_interruptible (&ccp->mutex))
1576 if (ccp->scontext.id == AUH_UNASSIGNED) {
1577 up (&ccp->mutex);
1582 if (down_interruptible (&ccp->readmutex)) {
1583 up (&ccp->mutex);
1589 bp = ccp->readbuf;
1592 int restlen = bp->len - ccp->readoffset;
1598 if (copy_to_user (buf, bp->bufp+ccp->readoffset, count)) {
1600 up (&ccp->readmutex);
1601 up (&ccp->mutex);
1606 ccp->readoffset += count;
1611 ccp->readbuf = NULL;
1615 up (&ccp->readmutex);
1616 up (&ccp->mutex);
1626 add_wait_queue (&ccp->readwait, &wait);
1629 spin_lock_irqsave (&ccp->bufctl.lock, flags);
1630 if (!list_empty (&ccp->bufctl.rec_buff_list)) {
1632 struct list_head *tmp = ccp->bufctl.rec_buff_list.next;
1636 spin_unlock_irqrestore (&ccp->bufctl.lock, flags);
1640 ccp->readbuf = bp;
1641 ccp->readoffset = AUH_SIZE; /* for headerbyte */
1643 remove_wait_queue (&ccp->readwait, &wait);
1651 remove_wait_queue (&ccp->readwait, &wait);
1652 up (&ccp->readmutex);
1653 up (&ccp->mutex);
1658 up (&ccp->mutex); /* allow other operations while we wait */
1660 remove_wait_queue (&ccp->readwait, &wait);
1663 up (&ccp->readmutex);
1668 if ((ccp->scontext.id == AUH_UNASSIGNED) || ccp->removed) {
1669 up (&ccp->readmutex);
1673 if (down_interruptible (&ccp->mutex)) {
1674 up (&ccp->readmutex);
1686 pauerchar_t ccp = (pauerchar_t) file->private_data;
1696 if (!ccp)
1705 if (down_interruptible (&ccp->mutex))
1709 if (ccp->scontext.id == AUH_UNASSIGNED) {
1710 up (&ccp->mutex);
1714 cp = ccp->auerdev;
1716 up (&ccp->mutex);
1720 up (&ccp->mutex);
1725 up (&ccp->mutex);
1734 We can't use a buffer from ccp->bufctl because the write
1749 up (&ccp->mutex);
1782 up (&ccp->mutex);
1787 *(bp->bufp) = ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT;
1794 bp->dr->wIndex = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
1807 up (&ccp->mutex);
1812 up (&ccp->mutex);
1821 pauerchar_t ccp = (pauerchar_t) file->private_data;
1825 down(&ccp->mutex);
1826 cp = ccp->auerdev;
1830 auerswald_removeservice (cp, &ccp->scontext);
1840 ccp->auerdev = NULL;
1842 up (&ccp->mutex);
1843 auerchar_delete (ccp);