aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-base.c
AgeCommit message (Collapse)Author
2011-06-06plugins: propagate cached probing result to supports taskAleksander Morgado
We need to ensure that the supports task always has the results of the probing, no matter if the probing was just launched by the plugin grabbing the port, or by a previous plugin. We do this during supports_port(), by propagating to the supports task any possible previously cached probing results.
2011-06-06plugin base: let plugins decide if they should be sorted lastAleksander Morgado
Note that even if a plugin says it wants to be sorted last, the generic plugin will always be the last one. Also, there is no order guaranteed between two plugins that request to be sorted last.
2011-06-06plugin base: include vendor ID and product ID retrieval during AT port probingAleksander Morgado
Port probing is extended to also query for Vendor ID and Product ID. This allows plugins to check whether the reported IDs are expected, and thus we enable plugins to handle modems connected via RS232 ports (where udev doesn't give any vendor ID) or modems connected via a USB adapter (where udev gives the vendor ID of the adapter). Note that this effectively means that a plugin which expects these kind of modem connections will end up always launching port probing as they won't only rely on the vendor ID reported by udev.
2011-06-05core: allow plugins to stop probing and not support a modemDan Williams
Previously plugins could only stop probing, *or* stop probing and indicate support for a device. For the Alcatel X200/X060s debacle we need to stop probing and indicate that the plugin does not support the device at all.
2011-04-26plugins: allow multiple custom init commands in sequenceDan Williams
Huawei will need this.
2011-04-26plugins: simplify custom init commandsDan Williams
Instead of having two places that custom init stuff got processed (a hook in the MMPluginBase class itself and a callback too) just use a callback, and simplify it somewhat so that the plugin tracks how many tries it cares about and what to do based on the response or error.
2011-04-14serial: allow spew control to be turned offNathan Williams
It's only used during probing where some port types (Sierra CnS and some Icera devices) may send streams of data that we can't understand until we close the port. It interferes with some SMS operations, so turn it off for ports opened after probing.
2011-04-08serial: allow plugins to specify probe-time send_delayDan Williams
Let modems we know don't suck use a zero send-delay at probe time, which greatly reduces time required to probe AT-compatible ports.
2011-03-11core: allow plugins to handle custom init responsesThomas Bechtold
2011-02-10core: allow platform devices without a VID/PIDTom Bechtold
Since platform devices don't usually have them.
2011-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.
2010-12-20Don't probe virtual devices before they existElly Jones
Prevent ModemManager from probing virtual devices before their associated files exist in /dev tree. Contributed by Nasser Grainawi <nasser@codeaurora.org> Review URL: http://codereview.chromium.org/2118005 (cherry picked from commit 617660e3572a7b79ed83f9fc0fda89b7efcb2d4d) Conflicts: src/mm-plugin-base.c Change-Id: Ie5e8b98fb6b6c69e294175523ef99c934092433b
2010-12-20Update from Qualcomm to support smd devices in Modem ManagerElly Jones
Review URL: http://codereview.chromium.org/661471 (cherry picked from commit 8475eb44b7ea41afa823919b017a39d82b07a5a2) Conflicts: src/mm-plugin-base.c Change-Id: I825886cad62a27acb39dfe74da7028d83adf692a
2010-10-22core: detect PCMCIA manfid and cardidDan Williams
These aren't added to the udev device database by anything yet (though they should be) so grab them manually.
2010-10-22core: strip "0x" off udev ID_VENDOR_ID and ID_MODEL_ID stringsDan Williams
2010-10-22core: use hardware IDs as part of DeviceIdentifierDan Williams
Pass the device's hardware IDs through modem creation and use them when calculating the device's identifier. Add a bunch of testcases for real hardware to ensure we don't break the device ID in the future unless we really want to.
2010-06-22gsm: add GetOperatorID methodTorgny Johansson
Returns the ID of the operator that issued the SIM card. Cleanups and get_mnc_length_done() by me (dcbw).
2010-05-05serial: fix possible segfault handing port-full signalsDan Williams
The argument passed to the handler is a GByteArray, not a GString. Encountered with Option iCON Icera-based devices, but could also be possible with Sierra devices.
2010-04-24core: fix serial error #definesDan Williams
Should have ERROR in them.
2010-04-24core: flash failure on disconnect shouldn't be a hard error (rh #578280)Dan Williams
2010-03-30core: find the existing modem for a port in the managerDan Williams
2010-03-30core: move physical device checking into the managerDan Williams
It turns out that the manager needs to know about the physical device so we can prevent multiple plugins from claiming ports on the same modem.
2010-03-23core: assume +CPIN "READY" response indicates GSM capability (rh #573510)Dan Williams
Assume (for now) that devices that respond to AT+CPIN without an error are GSM devices. This may not be 100% true as some devices in Asia (where CDMA devices use RUIMs which are basically SIMs) support +CPIN for unlocking the RUIM, but since CDMA devices more consistently implement AT+GCAP and ATI than we should be safe for a while.
2010-03-23core: grab probed QCDM ports for plugins where they are usefulDan Williams
2010-03-21core: parse the right thing on QCDM version info responseDan Williams
2010-03-20core: probe ports for QCDM capability tooDan Williams
2010-03-16core: immediately reject Sierra CnS ports during probeDan Williams
For now; until Sierra releases their CnS documentation.
2010-03-11core: fix merge damageDan Williams
2010-03-11Merge remote branch 'origin/master' into qcdmDan Williams
2010-03-11core: stop probing known-unusable ports earlyDan Williams
Some ports we know we shouldn't use when we get certain responses from them. Reading from these ports triggers kernel bugs (at least on 2.6.31 and 2.6.32) relating to flow control in some drivers (*cough* hso *cough*), so lets try not to aggravate the kernel too much. This happens on Icera-based Option devices like the GI0322 (AT&T Quicksilver) for example. (note: AFAICT this doesn't have any relation to the recent XON/XOFF patch, since I get this problem without the XON/XOFF patch on both 2.6.31 and 2.6.32 as well) --- BUG: sleeping function called from invalid context at kernel/mutex.c:94 in_atomic(): 1, irqs_disabled(): 1, pid: 9295, name: modem-manager Pid: 9295, comm: modem-manager Not tainted 2.6.32.9-67.fc12.x86_64 #1 Call Trace: <IRQ> [<ffffffff81045d41>] __might_sleep+0xed/0xef [<ffffffff81454dd0>] mutex_lock+0x24/0x50 [<ffffffff8104811e>] ? enqueue_task_fair+0x2a/0x6d [<ffffffff812af79f>] tty_throttle+0x1b/0x49 [<ffffffff812af0d9>] n_tty_receive_buf+0xdbb/0xe12 [<ffffffff810459fd>] ? task_rq_unlock+0x11/0x13 [<ffffffff81050c5c>] ? try_to_wake_up+0x2f3/0x305 [<ffffffff8110de0c>] ? __kmalloc+0x37/0x15e [<ffffffff8110de42>] ? __kmalloc+0x6d/0x15e [<ffffffff812b12c9>] flush_to_ldisc+0xf8/0x18d [<ffffffff812b13ae>] tty_flip_buffer_push+0x50/0x61 [<ffffffffa040ccd5>] put_rxbuf_data+0xea/0x124 [hso] [<ffffffffa040cd97>] put_rxbuf_data_and_resubmit_bulk_urb+0x21/0x6b [hso] [<ffffffffa040d0b1>] hso_std_serial_read_bulk_callback+0x14d/0x15f [hso] [<ffffffff8132edf7>] ? dma_unmap_single_attrs.clone.0+0x38/0x3a [<ffffffff8132ef74>] usb_hcd_giveback_urb+0x91/0xc5 [<ffffffff813417c8>] ehci_urb_done+0x7b/0x90 [<ffffffff81050c5c>] ? try_to_wake_up+0x2f3/0x305 [<ffffffff81341b45>] qh_completions+0x368/0x4b9 [<ffffffff8103e7a0>] ? __wake_up_common+0x4e/0x84 [<ffffffff81343f70>] ehci_work+0x95/0x732 [<ffffffff81045b53>] ? __wake_up+0x44/0x4d [<ffffffff81070490>] ? insert_work+0x8e/0x9b [<ffffffff81345f01>] ehci_irq+0x2be/0x420 [<ffffffff8107071a>] ? __queue_work+0x3a/0x41 [<ffffffff81049e43>] ? resched_cpu+0x6e/0x77 [<ffffffff8107075d>] ? delayed_work_timer_fn+0x3c/0x3e [<ffffffff810b0e44>] ? __rcu_process_callbacks+0x7d/0x28a [<ffffffff8132e846>] usb_hcd_irq+0x3f/0x7b [<ffffffff810acd61>] handle_IRQ_event+0x60/0x121 [<ffffffff810aeb8e>] handle_fasteoi_irq+0x8b/0xc7 [<ffffffff81014625>] handle_irq+0x8b/0x96 [<ffffffff81459c14>] do_IRQ+0x5c/0xbc [<ffffffff81012693>] ret_from_intr+0x0/0x11
2010-02-20serial: refactor MMSerialPort into a base class and an AT-capable serial portDan Williams
For QCDM devices we want most of what MMSerialPort does, but not the AT command handling stuff since the commands and responses aren't AT commands nor are they even strings. So convert everything that MMSerialPort does into a GByteArray, and let MMAtSerialPort handle the conversion to strings when necessary.
2010-01-18probe: add note about Onda MT503HS (rh #551376)Dan Williams
2010-01-17probe: add CPIN request during the probing process (bgo #604369)Dan Williams
Some devices (ZTE MF628) respond to everything except CPIN? with ERROR unless the PIN has been sent. Since no known CDMA devices support AT+CPIN, assume that devices that return a CPIN response are GSM devices.
2009-12-16zte: handle unsolicited messages during probeDan Williams
This implements the same fixes that NetworkManager's 0.7 branch implemented in commits f38ad328acfdc6ce29dd1380602c546b064161ae and 1235f71b20c92cded4abd976ccc5010649aae1a0. Many ZTE devices will spam the port with messages about waiting voicemail/SMS which buffer up and cause the device to eventually crash if not suppressed.
2009-11-26nozomi: fix detection (lp:425312)Dan Williams
Nozomi devices aren't quite ready when the ports show up, so we have to keep trying to open the port for a few seconds and eventually it'll succeed. Should really be fixed in the driver (ie, don't create the ttys until they can actually be used) but whatever.
2009-11-17probe: fix probing on PPC due to missing castDan Williams
gcc will interpret the constant value as a uint32 but the port's set_property() was taking it as a uint64. Thus the top 32 bits were probably garbage, and messed up on big-endian architectures leading to random large probe delays.
2009-10-02bluetooth: physical device is a bit higher up the treeDan Williams
2009-10-02bluetooth: recognize rfcomm devicesDan Williams
Two hacks here: 1) rfcomm ports don't have an easily accessible driver name, so we just match the parent's subsystem to 'bluetooth' and use that 2) libgudev doesn't seem be be able to get the rfcomm device's device file, which would normally be /dev/rfcommX. Oh well, we don't use the device file yet anyway
2009-09-08core: don't allow concurrent flashes on the same deviceDan Williams
Previously, a few operations (like disable) could trigger a modem flash in parallel with another flash. That's wrong, don't allow that. At the same time, add in finer-grained error checking on serial port speed operations, and fix a GSM generic bug that would send the POWER_UP string on disable.
2009-08-26core: fix uninitialized variableBryan Duff
2009-06-29plugin-base: better Huawei detection; don't drop BUSlink responseDan Williams
2009-06-29plugin-base: don't scribble on memory when looking up cached capabilitiesDan Williams
2009-06-29plugin-base: fix finding the physical device againDan Williams
Don't mis-use udev's ID_BUS key.
2009-06-29plugin-base: better detection of physical deviceDan Williams
2009-06-28asynchronous and deferred port detectionDan Williams
Allow plugins to perform asynchronous port detection, and to defer port detection until later. This moves the prober bits into MMPluginBase so that all plugins can take adavantage of it only when needed; the probing is not done at udev time. Furthermore, plugins like Novatel can flip the secondary ports over the AT mode through deferred detection, by deferring the secondary ports until the main port has been detected and AT$NWDMAT has been sent. This commit also finishes the port of the rest of the plugins (except mbm) over to the new port detection methods and plugin API.
2009-06-20plugins: implement mm_plugin_base_get_device_ids()Dan Williams
We'll need it in more than one place, so make it generic.
2009-06-19plugin: add a base class to handle modem trackingDan Williams