Update SAI module for Celestica for Bullseye and 5.10 kernel
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
9a3a17c547
commit
e360fc3027
@ -7,7 +7,7 @@ include $(PLATFORM_PATH)/platform-modules-nokia.mk
|
||||
#include $(PLATFORM_PATH)/platform-modules-accton.mk
|
||||
#include $(PLATFORM_PATH)/platform-modules-alphanetworks.mk
|
||||
#include $(PLATFORM_PATH)/platform-modules-inventec.mk
|
||||
#include $(PLATFORM_PATH)/platform-modules-cel.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-cel.mk
|
||||
#include $(PLATFORM_PATH)/platform-modules-delta.mk
|
||||
#include $(PLATFORM_PATH)/platform-modules-quanta.mk
|
||||
##include $(PLATFORM_PATH)/platform-modules-mitac.mk
|
||||
|
@ -7,21 +7,21 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-dx010
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.19.0-12-2-amd64-unsigned
|
||||
Depends: linux-image-5.10.0-8-2-amd64-unsigned
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
||||
Package: platform-modules-haliburton
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.19.0-12-2-amd64-unsigned
|
||||
Depends: linux-image-5.10.0-8-2-amd64-unsigned
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-seastone2
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.19.0-12-2-amd64-unsigned
|
||||
Depends: linux-image-5.10.0-8-2-amd64-unsigned
|
||||
Description: kernel modules for platform devices such as led, sfp
|
||||
|
||||
Package: platform-modules-silverstone
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.19.0-12-2-amd64-unsigned
|
||||
Depends: linux-image-5.10.0-8-2-amd64-unsigned
|
||||
Description: kernel modules for platform devices such as led, sfp.
|
||||
|
@ -4,6 +4,5 @@ dx010/systemd/platform-modules-dx010.service lib/systemd/system
|
||||
dx010/scripts/fancontrol.sh etc/init.d
|
||||
dx010/scripts/fancontrol.service lib/systemd/system
|
||||
services/fancontrol/fancontrol usr/local/bin
|
||||
dx010/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-cel_seastone-r0
|
||||
dx010/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-cel_seastone-r0
|
||||
services/platform_api/platform_api_mgnt.sh usr/local/bin
|
||||
|
@ -3,7 +3,6 @@ haliburton/systemd/platform-modules-haliburton.service lib/systemd/system
|
||||
haliburton/script/fancontrol.sh etc/init.d
|
||||
haliburton/script/fancontrol.service lib/systemd/system
|
||||
services/fancontrol/fancontrol usr/local/bin
|
||||
haliburton/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-cel_e1031-r0
|
||||
haliburton/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-cel_e1031-r0
|
||||
services/platform_api/platform_api_mgnt.sh usr/local/bin
|
||||
haliburton/script/popmsg.sh usr/local/bin
|
||||
|
@ -1,4 +1,4 @@
|
||||
seastone2/cfg/seastone2-modules.conf etc/modules-load.d
|
||||
seastone2/systemd/platform-modules-seastone2.service lib/systemd/system
|
||||
seastone2/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-cel_seastone_2-r0
|
||||
seastone2/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-cel_seastone_2-r0
|
||||
services/platform_api/platform_api_mgnt.sh usr/local/bin
|
@ -2,5 +2,5 @@ silverstone/scripts/sensors usr/bin
|
||||
silverstone/scripts/platform_sensors.py usr/local/bin
|
||||
silverstone/cfg/silverstone-modules.conf etc/modules-load.d
|
||||
silverstone/systemd/platform-modules-silverstone.service lib/systemd/system
|
||||
silverstone/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-cel_silverstone-r0
|
||||
silverstone/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-cel_silverstone-r0
|
||||
services/platform_api/platform_api_mgnt.sh usr/local/bin
|
||||
|
@ -15,12 +15,10 @@ override_dh_auto_build:
|
||||
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
if [ $$mod = "seastone2" ]; then \
|
||||
cd services/platform_api; \
|
||||
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
continue; \
|
||||
fi; \
|
||||
cd $(MOD_SRC_DIR)/$${mod}; \
|
||||
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
|
||||
done)
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
@ -94,7 +94,7 @@ static int mc24lc64t_probe(struct i2c_client *client,
|
||||
sizeof(struct mc24lc64t_data), GFP_KERNEL)))
|
||||
return -ENOMEM;
|
||||
|
||||
drvdata->fake_client = i2c_new_dummy(client->adapter, client->addr + 1);
|
||||
drvdata->fake_client = i2c_new_dummy_device(client->adapter, client->addr + 1);
|
||||
if (!drvdata->fake_client)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -94,7 +94,7 @@ static int mc24lc64t_probe(struct i2c_client *client,
|
||||
sizeof(struct mc24lc64t_data), GFP_KERNEL)))
|
||||
return -ENOMEM;
|
||||
|
||||
drvdata->fake_client = i2c_new_dummy(client->adapter, client->addr + 1);
|
||||
drvdata->fake_client = i2c_new_dummy_device(client->adapter, client->addr + 1);
|
||||
if (!drvdata->fake_client)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/module.h>
|
||||
|
@ -1870,7 +1870,7 @@ static struct i2c_adapter * seastone2_i2c_init(struct platform_device *pdev,
|
||||
if (!new_data) {
|
||||
printk(KERN_ALERT "Cannot alloc i2c data for %s",
|
||||
fpga_i2c_bus_dev[portid].calling_name);
|
||||
kzfree(new_adapter);
|
||||
kfree_sensitive(new_adapter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1889,8 +1889,8 @@ static struct i2c_adapter * seastone2_i2c_init(struct platform_device *pdev,
|
||||
error = i2c_add_numbered_adapter(new_adapter);
|
||||
if (error < 0) {
|
||||
printk(KERN_ALERT "Cannot add i2c adapter %s", new_data->pca9548.calling_name);
|
||||
kzfree(new_adapter);
|
||||
kzfree(new_data);
|
||||
kfree_sensitive(new_adapter);
|
||||
kfree_sensitive(new_data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1936,7 +1936,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
|
||||
fpga = kobject_create_and_add("FPGA", &pdev->dev.kobj);
|
||||
if (!fpga) {
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -1944,7 +1944,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
if (ret != 0) {
|
||||
printk(KERN_ERR "Cannot create FPGA sysfs attributes\n");
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1952,7 +1952,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
if (!cpld1) {
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = sysfs_create_group(cpld1, &cpld1_attr_grp);
|
||||
@ -1961,7 +1961,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1971,7 +1971,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = sysfs_create_group(cpld2, &cpld2_attr_grp);
|
||||
@ -1982,7 +1982,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1995,7 +1995,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return PTR_ERR(sff_dev);
|
||||
}
|
||||
|
||||
@ -2009,7 +2009,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2023,7 +2023,7 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2040,9 +2040,9 @@ static int seastone2_drv_probe(struct platform_device *pdev)
|
||||
sff_data = dev_get_drvdata(fpga_data->sff_devices[portid_count]);
|
||||
BUG_ON(sff_data == NULL);
|
||||
if ( sff_data->port_type == QSFP ) {
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_device(i2c_adap, &sff8436_eeprom_info[0]);
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_client_device(i2c_adap, &sff8436_eeprom_info[0]);
|
||||
} else {
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_device(i2c_adap, &sff8436_eeprom_info[1]);
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_client_device(i2c_adap, &sff8436_eeprom_info[1]);
|
||||
}
|
||||
sff_data = NULL;
|
||||
sysfs_create_link(&fpga_data->sff_devices[portid_count]->kobj,
|
||||
|
@ -4,20 +4,13 @@ PREV_REBOOT_CAUSE="/host/reboot-cause/"
|
||||
DEVICE="/usr/share/sonic/device"
|
||||
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
|
||||
FILES=$DEVICE/$PLATFORM/api_files
|
||||
PY2_PACK=$DEVICE/$PLATFORM/sonic_platform-1.0-py2-none-any.whl
|
||||
PY3_PACK=$DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl
|
||||
|
||||
install() {
|
||||
# Install python2.7 sonic-platform package
|
||||
if [ -e $PY2_PACK ]; then
|
||||
pip install $PY2_PACK
|
||||
fi
|
||||
|
||||
# Install python3 sonic-platform package
|
||||
if [ -e $PY3_PACK ]; then
|
||||
pip3 install $PY3_PACK
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -1604,7 +1604,7 @@ static struct i2c_adapter * silverstone_i2c_init(struct platform_device *pdev, i
|
||||
new_data = kzalloc(sizeof(*new_data), GFP_KERNEL);
|
||||
if (!new_data) {
|
||||
printk(KERN_ALERT "Cannot alloc i2c data for %s", fpga_i2c_bus_dev[portid].calling_name);
|
||||
kzfree(new_adapter);
|
||||
kfree_sensitive(new_adapter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1623,8 +1623,8 @@ static struct i2c_adapter * silverstone_i2c_init(struct platform_device *pdev, i
|
||||
error = i2c_add_numbered_adapter(new_adapter);
|
||||
if (error < 0) {
|
||||
printk(KERN_ALERT "Cannot add i2c adapter %s", new_data->pca9548.calling_name);
|
||||
kzfree(new_adapter);
|
||||
kzfree(new_data);
|
||||
kfree_sensitive(new_adapter);
|
||||
kfree_sensitive(new_data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1685,7 +1685,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
|
||||
fpga = kobject_create_and_add("FPGA", &pdev->dev.kobj);
|
||||
if (!fpga) {
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -1693,7 +1693,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
if (ret != 0) {
|
||||
printk(KERN_ERR "Cannot create FPGA sysfs attributes\n");
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1701,7 +1701,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
if (!cpld1) {
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = sysfs_create_group(cpld1, &cpld1_attr_grp);
|
||||
@ -1710,7 +1710,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1720,7 +1720,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
ret = sysfs_create_group(cpld2, &cpld2_attr_grp);
|
||||
@ -1731,7 +1731,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1744,7 +1744,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return PTR_ERR(sff_dev);
|
||||
}
|
||||
|
||||
@ -1758,7 +1758,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1772,7 +1772,7 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
kobject_put(cpld1);
|
||||
sysfs_remove_group(fpga, &fpga_attr_grp);
|
||||
kobject_put(fpga);
|
||||
kzfree(fpga_data);
|
||||
kfree_sensitive(fpga_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1788,9 +1788,9 @@ static int silverstone_drv_probe(struct platform_device *pdev)
|
||||
sff_data = dev_get_drvdata(fpga_data->sff_devices[portid_count]);
|
||||
BUG_ON(sff_data == NULL);
|
||||
if ( sff_data->port_type == QSFP ) {
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_device(i2c_adap, &sff8436_eeprom_info[0]);
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_client_device(i2c_adap, &sff8436_eeprom_info[0]);
|
||||
} else {
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_device(i2c_adap, &sff8436_eeprom_info[1]);
|
||||
fpga_data->sff_i2c_clients[portid_count] = i2c_new_client_device(i2c_adap, &sff8436_eeprom_info[1]);
|
||||
}
|
||||
sff_data = NULL;
|
||||
sysfs_create_link(&fpga_data->sff_devices[portid_count]->kobj,
|
||||
|
Loading…
Reference in New Issue
Block a user