Re: [LEDE-DEV] [PATCH 3/3] usbmode: remove devices with unsupported modes

2017-12-22 Thread Bjørn Mork
Julian Labus  writes:

> On 12/22/2017 10:48 AM, Bjørn Mork wrote:
>> Julian Labus  writes:
>> 
>>> diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
>>> index 7f0195fdce..1b1ef147b6 100644
>>> --- a/package/utils/usbmode/Makefile
>>> +++ b/package/utils/usbmode/Makefile
>>> @@ -40,8 +40,13 @@ endef
>>>  define Build/Prepare
>>> $(Build/Prepare/Default)
>>> tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
>>> -   rm -f \
>>> -   
>>> $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
>>> +   #remove devices with unsupported modes
>>> +   for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
>>> +   do \
>>> +   if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' 
>>> "filevar" ; then \
>>> +   rm "filevar" ; \
>>> +   fi \
>>> +   done
>>> cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
>>> #in order to keep the Lede GIT repo free of filenames with colons,
>>> #we name the files -
>> 
>> 
>> Sorry for the extremely late comment on this.  I missed the discussion
>> when it happened, but was made aware of it now because users with Option
>> modems complain that the modems have stopped working with LEDE.
>> 
>> This patch is papering over a regression introduced by updating the data
>> package.  I strongly object to that sort of bug "fixing".  Option modems
>> used to work with the old data package, as it included the explicit
>> message for each Option device entry.  Adding new modems does not
>> justify dropping support for older modems.
>> 
>> Please fix this properly instead if you want to update to the config
>> data.
>
> Hi Bjørn,
>
> I didn't recognize that new modes where introduced for existing devices. To me
> it looked like they where introduced to support previously unsupported 
> devices.
> Knowing that, I wouldn't have submitted the patch.

Yes, I believe this is correct for the Quanta, Blackberry and Pantech
modes. They use special control requests anyway, which I don't think
could be expressed using the older config.

But all the 61 OptionMode entries in usb-modeswitch-data-20170205 were
also present in usb-modeswitch-data-20150115. 

> I saw that you already updated usbmode to support the missing modes. Once the
> package is updated accordingly my "patch" can be reverted.

Yes.  But in the short run, you might want to do a quickfix ala

if grep -q 'OptionMode' "filevar" ; then \
  sed -i -e 
's/^OptionMode=1/MessageContent="55534243785634120100860100"\nNoDriverLoading=1/'
 "filevar" \
fi

or similar in that fixup loop, and drop 'Option|' from the regex.  This
should be enough to convert the Option entries back to the old config
format.



Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 3/3] usbmode: remove devices with unsupported modes

2017-12-22 Thread Julian Labus
On 12/22/2017 10:48 AM, Bjørn Mork wrote:
> Julian Labus  writes:
> 
>> diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
>> index 7f0195fdce..1b1ef147b6 100644
>> --- a/package/utils/usbmode/Makefile
>> +++ b/package/utils/usbmode/Makefile
>> @@ -40,8 +40,13 @@ endef
>>  define Build/Prepare
>>  $(Build/Prepare/Default)
>>  tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
>> -rm -f \
>> -
>> $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
>> +#remove devices with unsupported modes
>> +for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
>> +do \
>> +if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' 
>> "filevar" ; then \
>> +rm "filevar" ; \
>> +fi \
>> +done
>>  cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
>>  #in order to keep the Lede GIT repo free of filenames with colons,
>>  #we name the files -
> 
> 
> Sorry for the extremely late comment on this.  I missed the discussion
> when it happened, but was made aware of it now because users with Option
> modems complain that the modems have stopped working with LEDE.
> 
> This patch is papering over a regression introduced by updating the data
> package.  I strongly object to that sort of bug "fixing".  Option modems
> used to work with the old data package, as it included the explicit
> message for each Option device entry.  Adding new modems does not
> justify dropping support for older modems.
> 
> Please fix this properly instead if you want to update to the config
> data.

Hi Bjørn,

I didn't recognize that new modes where introduced for existing devices. To me
it looked like they where introduced to support previously unsupported devices.
Knowing that, I wouldn't have submitted the patch.

I saw that you already updated usbmode to support the missing modes. Once the
package is updated accordingly my "patch" can be reverted.

Kind regards,
Julian

Kind regards,
Julian

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 3/3] usbmode: remove devices with unsupported modes

2017-12-22 Thread Bjørn Mork
Julian Labus  writes:

> diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
> index 7f0195fdce..1b1ef147b6 100644
> --- a/package/utils/usbmode/Makefile
> +++ b/package/utils/usbmode/Makefile
> @@ -40,8 +40,13 @@ endef
>  define Build/Prepare
>   $(Build/Prepare/Default)
>   tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
> - rm -f \
> - 
> $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
> + #remove devices with unsupported modes
> + for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
> + do \
> + if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' 
> "filevar" ; then \
> + rm "filevar" ; \
> + fi \
> + done
>   cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
>   #in order to keep the Lede GIT repo free of filenames with colons,
>   #we name the files -


Sorry for the extremely late comment on this.  I missed the discussion
when it happened, but was made aware of it now because users with Option
modems complain that the modems have stopped working with LEDE.

This patch is papering over a regression introduced by updating the data
package.  I strongly object to that sort of bug "fixing".  Option modems
used to work with the old data package, as it included the explicit
message for each Option device entry.  Adding new modems does not
justify dropping support for older modems.

Please fix this properly instead if you want to update to the config
data.


Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 3/3] usbmode: remove devices with unsupported modes

2017-05-24 Thread Julian Labus
remove files which include the following mode options
BlackberryMode OptionMode PantechMode QuantaMode

Signed-off-by: Julian Labus 
---
 package/utils/usbmode/Makefile | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index 7f0195fdce..1b1ef147b6 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -40,8 +40,13 @@ endef
 define Build/Prepare
$(Build/Prepare/Default)
tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
-   rm -f \
-   
$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
+   #remove devices with unsupported modes
+   for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
+   do \
+   if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' 
"filevar" ; then \
+   rm "filevar" ; \
+   fi \
+   done
cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
#in order to keep the Lede GIT repo free of filenames with colons,
#we name the files -
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev