Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) 2003 Christoph Hellwig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #include <linux/errno.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/sysctl.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include "scsi_logging.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include "scsi_priv.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) static struct ctl_table scsi_table[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	{ .procname	= "logging_level",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	  .data		= &scsi_logging_level,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	  .maxlen	= sizeof(scsi_logging_level),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	  .mode		= 0644,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	  .proc_handler	= proc_dointvec },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) static struct ctl_table scsi_dir_table[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	{ .procname	= "scsi",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	  .mode		= 0555,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	  .child	= scsi_table },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) static struct ctl_table scsi_root_table[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	{ .procname	= "dev",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	  .mode		= 0555,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	  .child	= scsi_dir_table },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) static struct ctl_table_header *scsi_table_header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) int __init scsi_init_sysctl(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 	scsi_table_header = register_sysctl_table(scsi_root_table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 	if (!scsi_table_header)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) void scsi_exit_sysctl(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	unregister_sysctl_table(scsi_table_header);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) }